I have an array of bytes that I read from a header section of a message. These bytes contain the length of the message. There never are more than 3 bytes and they are ordere
Use methods like BitConverter.ToInt32, but realize that you'll need 4 bytes for 32 bit quantities.
var data = new byte[] {39, 213, 2, 0}; int integer = BitConverter.ToInt32(data, 0);
There are also other methods to convert to and from other types like Single and Double.