Skip to content

ByteArrayExtensions.GetInt16 Method ​

Overloads ​

NameDescription
GetInt16(Byte[], Int32)Reads a little-endian Int16 from a byte array at the specified index.
GetInt16(Byte[], Int32, Endian)Reads a Int16 from a byte array at the specified index using the specified endianness.

GetInt16(Byte[], Int32) ​

Reads a little-endian Int16 from a byte array at the specified index.

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

View source

Parameters ​

NameTypeDescription
bytesByte[]
indexInt32The zero-based index to read from.

Returns ​

Int16

The Int16 value.

GetInt16(Byte[], Int32, Endian) ​

Reads a Int16 from a byte array at the specified index using the specified endianness.

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

View source

Parameters ​

NameTypeDescription
bytesByte[]
indexInt32The zero-based index to read from.
endianEndianThe endianness to use.

Returns ​

Int16

The Int16 value.