Skip to content

ByteArrayExtensions.SetInt16 Method ​

Overloads ​

NameDescription
SetInt16(Byte[], Int32, Int16)Writes a little-endian Int16 to a byte array at the specified index.
SetInt16(Byte[], Int32, Int16, Endian)Writes a Int16 to a byte array at the specified index using the specified endianness.

SetInt16(Byte[], Int32, Int16) ​

Writes a little-endian Int16 to a byte array at the specified index.

c#
public static void SetInt16(this Byte[] bytes, int index, Int16 value);

View source

Parameters ​

NameTypeDescription
bytesByte[]
indexInt32The zero-based index to write to.
valueInt16The value to write.

SetInt16(Byte[], Int32, Int16, Endian) ​

Writes a Int16 to a byte array at the specified index using the specified endianness.

c#
public static void SetInt16(this Byte[] bytes, int index, Int16 value, Endian endian);

View source

Parameters ​

NameTypeDescription
bytesByte[]
indexInt32The zero-based index to write to.
valueInt16The value to write.
endianEndianThe endianness to use.