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