I want to have a method with the body:
public UInt16 ReadMemory16(Byte[] memory, UInt16 address)
{
// read two bytes at the predefined address
}
So, I want to get the value at memory[address] AND the next byte and combine them into a single UInt16.
For the order of the bytes, the machine I'm implementing is little endian if that matters. How do I get both of those byte values and combine them into a single UInt16 in C#?