I have an array of bytes that I read from the message header section. These bytes contain the length of the message. There are never more than 3 bytes, and they are ordered from LSB to MSB. Thus, in the example below, 39 is an LSB and 2 is an MSB.
var data = new byte[] { 39, 213, 2 };
In the above example, how can I take these bytes and convert to a number (int, short, etc.)?
source share