WriteUInt16 Method
WriteUInt16(Int32, UInt16, Boolean)
Add an unsigned 16-bit integer as the value to be written out.
C#
public void WriteUInt16(int tag, ushort value, bool bigEndian = true)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | The tag that will be written out when this TLV is encoded. |
System.UInt16 | value | The unsigned short to be converted into a byte array. |
System.Boolean | bigEndian | If true, write out the short as big endian, with the high order byte of the value in the left most position in the byte array. If false, write out the value as little endian, with the low order byte of the value in the left most position in the byte array. |