ByteIReadOnlyListExtensions.GetUInt16 Method
Overloads
| Name | Description |
|---|---|
| GetUInt16(IReadOnlyList<Byte>, Int32) | Reads a little-endian UInt16 from a read-only list of bytes at the specified index. |
| GetUInt16(IReadOnlyList<Byte>, Int32, Endian) | Reads a UInt16 from a read-only list of bytes at the specified index using the specified endianness. |
GetUInt16(IReadOnlyList<Byte>, Int32)
Reads a little-endian UInt16 from a read-only list of bytes at the specified index.
public static ushort GetUInt16(this IReadOnlyList<Byte> bytes, int index);
Parameters
| Name | Type | Description |
|---|---|---|
| bytes | IReadOnlyList<Byte> | |
| index | Int32 | The zero-based index to read from. |
Returns
The UInt16 value.
GetUInt16(IReadOnlyList<Byte>, Int32, Endian)
Reads a UInt16 from a read-only list of bytes at the specified index using the specified endianness.
public static ushort GetUInt16(this IReadOnlyList<Byte> bytes, int index, Endian endian);
Parameters
| Name | Type | Description |
|---|---|---|
| bytes | IReadOnlyList<Byte> | |
| index | Int32 | The zero-based index to read from. |
| endian | Endian | The endianness to use. |
Returns
The UInt16 value.