I got an array which contains signed int data, i need to convert each value in the array to 2 bytes. I am using C# and i tried using BitConverter.GetBytes(int) but it returns a 4 byte array.
I got an array which contains signed int data, i need to convert each
Share
A signed 16-bit value is best represented as a
shortrather thanint– so useBitConverter.GetBytes(short).However, as an alternative: