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