Class Uint16
Derived UInt class for serializing/deserializing 16 bit UInt
Implements
Inherited Members
Namespace: Xrpl.BinaryCodec.Types
Assembly: Xrpl.BinaryCodec.dll
Syntax
public class Uint16 : Uint<ushort>, ISerializedType
Constructors
| Improve this Doc View SourceUint16(Byte)
create instance of this value
Declaration
public Uint16(byte value)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | value | byte value |
Uint16(UInt16)
create instance of this value
Declaration
public Uint16(ushort value)
Parameters
Type | Name | Description |
---|---|---|
System.UInt16 | value | ushort value |
Methods
| Improve this Doc View SourceFromJson(JToken)
Deserialize Uint16
Declaration
public static Uint16 FromJson(JToken token)
Parameters
Type | Name | Description |
---|---|---|
JToken | token | json token |
Returns
Type | Description |
---|---|
Uint16 | Uint16 value |
FromParser(BinaryParser, Nullable<Int32>)
Construct a Uint16 from a BinaryParser
Declaration
public static Uint16 FromParser(BinaryParser parser, int? hint = null)
Parameters
Type | Name | Description |
---|---|---|
BinaryParser | parser | A BinaryParser to read Uint16 from |
System.Nullable<System.Int32> | hint |
Returns
Type | Description |
---|---|
Uint16 |
FromValue(Int32)
create instance of this value
Declaration
public static Uint16 FromValue(int v)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | v | int value |
Returns
Type | Description |
---|---|
Uint16 |
ToBytes()
convert to bytes array
Declaration
public override byte[] ToBytes()
Returns
Type | Description |
---|---|
System.Byte[] |
Overrides
Xrpl.BinaryCodec.Types.Uint<System.UInt16>.ToBytes()
Operators
| Improve this Doc View SourceImplicit(UInt16 to Uint16)
create instance of this value
Declaration
public static implicit operator Uint16(ushort v)
Parameters
Type | Name | Description |
---|---|---|
System.UInt16 | v | ushort value |
Returns
Type | Description |
---|---|
Uint16 |