ByteArrayExtensions.SetUInt16 Method ​
Overloads ​
| Name | Description |
|---|---|
SetUInt16(Byte[], Int32, UInt16) | Writes a little-endian UInt16 to a byte array at the specified index. |
SetUInt16(Byte[], Int32, UInt16, Endian) | Writes a UInt16 to a byte array at the specified index using the specified endianness. |
SetUInt16(Byte[], Int32, UInt16) ​
Writes a little-endian UInt16 to a byte array at the specified index.
c#
public static void SetUInt16(this Byte[] bytes, int index, ushort value);Parameters ​
| Name | Type | Description |
|---|---|---|
bytes | Byte[] | |
index | Int32 | The zero-based index to write to. |
value | UInt16 | The UInt16 value to write. |
SetUInt16(Byte[], Int32, UInt16, Endian) ​
Writes a UInt16 to a byte array at the specified index using the specified endianness.
c#
public static void SetUInt16(this Byte[] bytes, int index, ushort value, Endian endian);Parameters ​
| Name | Type | Description |
|---|---|---|
bytes | Byte[] | |
index | Int32 | The zero-based index to write to. |
value | UInt16 | The UInt16 value to write. |
endian | Endian | The endianness to use. |