ByteArrayExtensions.GetInt16 Method
Overloads
| Name | Description |
|---|---|
| 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.
public static Int16 GetInt16(this Byte[] bytes, int index);
Parameters
| Name | Type | Description |
|---|---|---|
| bytes | Byte[] | |
| index | Int32 | The zero-based index to read from. |
Returns
The Int16 value.
GetInt16(Byte[], Int32, Endian)
Reads a Int16 from a byte array at the specified index using the specified endianness.
public static Int16 GetInt16(this Byte[] bytes, int index, Endian endian);
Parameters
| Name | Type | Description |
|---|---|---|
| bytes | Byte[] | |
| index | Int32 | The zero-based index to read from. |
| endian | Endian | The endianness to use. |
Returns
The Int16 value.