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