Skip to content

ByteIListExtensions.GetUInt16 Method ​

Overloads ​

NameDescription
GetUInt16(IList<Byte>, Int32)Reads a little-endian UInt16 from a list of bytes at the specified index.
GetUInt16(IList<Byte>, Int32, Endian)Reads a UInt16 from a list of bytes at the specified index using the specified endianness.

GetUInt16(IList<Byte>, Int32) ​

Reads a little-endian UInt16 from a list of bytes at the specified index.

c#
public static ushort GetUInt16(this IList<Byte> bytes, int index);

View source

Parameters ​

NameTypeDescription
bytesIList<Byte>
indexInt32The zero-based index to read from.

Returns ​

UInt16

The UInt16 value.

GetUInt16(IList<Byte>, Int32, Endian) ​

Reads a UInt16 from a list of bytes at the specified index using the specified endianness.

c#
public static ushort GetUInt16(this IList<Byte> bytes, int index, Endian endian);

View source

Parameters ​

NameTypeDescription
bytesIList<Byte>
indexInt32The zero-based index to read from.
endianEndianThe endianness to use.

Returns ​

UInt16

The UInt16 value.