Skip to content

ByteListExtensions.SetUInt16 Method ​

Overloads ​

NameDescription
SetUInt16(List<Byte>, Int32, UInt16)Writes a little-endian UInt16 to a List<T> of bytes at the specified index.
SetUInt16(List<Byte>, Int32, UInt16, Endian)Writes a UInt16 to a List<T> of bytes at the specified index using the specified endianness.

SetUInt16(List<Byte>, Int32, UInt16) ​

Writes a little-endian UInt16 to a List<T> of bytes at the specified index.

c#
public static void SetUInt16(this List<Byte> bytes, int index, ushort value);

View source

Parameters ​

NameTypeDescription
bytesList<Byte>
indexInt32The zero-based index to write to.
valueUInt16The UInt16 value to write.

SetUInt16(List<Byte>, Int32, UInt16, Endian) ​

Writes a UInt16 to a List<T> of bytes at the specified index using the specified endianness.

c#
public static void SetUInt16(this List<Byte> bytes, int index, ushort value, Endian endian);

View source

Parameters ​

NameTypeDescription
bytesList<Byte>
indexInt32The zero-based index to write to.
valueUInt16The UInt16 value to write.
endianEndianThe endianness to use.