ReadOnlyMemoryExtensions.GetInt16 Method
Overloads
| Name | Description |
|---|---|
| GetInt16(ReadOnlyMemory<Byte>, Int32) | Reads a little-endian Int16 from read-only memory at the specified index. |
| GetInt16(ReadOnlyMemory<Byte>, Int32, Endian) | Reads a Int16 from read-only memory at the specified index using the specified endianness. |
GetInt16(ReadOnlyMemory<Byte>, Int32)
Reads a little-endian Int16 from read-only memory at the specified index.
public static Int16 GetInt16(this ReadOnlyMemory<Byte> bytes, int index);
Parameters
| Name | Type | Description |
|---|---|---|
| bytes | ReadOnlyMemory<Byte> | |
| index | Int32 | The zero-based index to read from. |
Returns
The Int16 value.
GetInt16(ReadOnlyMemory<Byte>, Int32, Endian)
Reads a Int16 from read-only memory at the specified index using the specified endianness.
public static Int16 GetInt16(this ReadOnlyMemory<Byte> bytes, int index, Endian endian);
Parameters
| Name | Type | Description |
|---|---|---|
| bytes | ReadOnlyMemory<Byte> | |
| index | Int32 | The zero-based index to read from. |
| endian | Endian | The endianness to use. |
Returns
The Int16 value.