WriteInt32 Method
WriteInt32(Int32, Int32, Boolean)
Add a 32-bit integer as the value to be written out.
C#
public void WriteInt32(int tag, int value, bool bigEndian = true)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | tag | The tag that will be written out when this TLV is encoded. |
System.Int32 | value | The int to be converted into a byte array. |
System.Boolean | bigEndian | If true, write out the int 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. |
Exceptions
Type | Condition |
---|---|
TlvException | The tag is invalid. |