ByteReadOnlySpanExtensions.GetInt16 Method ​
Overloads ​
| Name | Description |
|---|---|
GetInt16(ReadOnlySpan<Byte>) | Reads a little-endian Int16 from a read-only span of bytes. |
GetInt16(ReadOnlySpan<Byte>, Endian) | Reads a Int16 from a read-only span of bytes using the specified endianness. |
GetInt16(ReadOnlySpan<Byte>) ​
Reads a little-endian Int16 from a read-only span of bytes.
c#
public static Int16 GetInt16(this ReadOnlySpan<Byte> bytes);Parameters ​
| Name | Type | Description |
|---|---|---|
bytes | ReadOnlySpan<Byte> |
Returns ​
The Int16 value.
GetInt16(ReadOnlySpan<Byte>, Endian) ​
Reads a Int16 from a read-only span of bytes using the specified endianness.
c#
public static Int16 GetInt16(this ReadOnlySpan<Byte> bytes, Endian endian);Parameters ​
| Name | Type | Description |
|---|---|---|
bytes | ReadOnlySpan<Byte> | |
endian | Endian | The endianness to use. |
Returns ​
The Int16 value.