BitSharp.Common.Bits.EncodeInt16 C# (CSharp) Method

EncodeInt16() public static method

public static EncodeInt16 ( short value, byte buffer, int offset ) : void
value short
buffer byte
offset int
return void
        public static void EncodeInt16(short value, byte[] buffer, int offset = 0)
        {
            unchecked
            {
                buffer[offset++] = (byte)(value);
                buffer[offset++] = (byte)(value >> 8);
            }
        }