跳到主要内容
版本:Next

Struct VarUShort

Namespace: ReadyM.Api.Serialization
Assembly: ReadyM.Api.dll

Variable-length unsigned short. Most significant bit of each byte is used as a continuation flag. The remaining 7 bits are used to store the value.

public struct VarUShort : INetSerializable, IEquatable<VarUShort>

Implements​

INetSerializable, IEquatable<VarUShort>

Inherited Members​

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors​

VarUShort(ushort)​

Variable-length unsigned short. Most significant bit of each byte is used as a continuation flag. The remaining 7 bits are used to store the value.

public VarUShort(ushort value)

Parameters​

value ushort

Fields​

MaxSize​

public const int MaxSize = 3

Field Value​

int

Properties​

Value​

public readonly ushort Value { get; }

Property Value​

ushort

Methods​

Equals(VarUShort)​

public bool Equals(VarUShort other)

Parameters​

other VarUShort

Returns​

bool

Equals(object?)​

public override bool Equals(object? obj)

Parameters​

obj object?

Returns​

bool

GetHashCode()​

public override int GetHashCode()

Returns​

int

SizeOf(ushort)​

How many bytes the value takes on the wire.

public static int SizeOf(ushort value)

Parameters​

value ushort

Returns​

int

ToString()​

public override string ToString()

Returns​

string

Operators​

operator ==(VarUShort, VarUShort)​

public static bool operator ==(VarUShort left, VarUShort right)

Parameters​

left VarUShort

right VarUShort

Returns​

bool

implicit operator ushort(VarUShort)​

public static implicit operator ushort(VarUShort value)

Parameters​

value VarUShort

Returns​

ushort

implicit operator VarUShort(ushort)​

public static implicit operator VarUShort(ushort value)

Parameters​

value ushort

Returns​

VarUShort

operator !=(VarUShort, VarUShort)​

public static bool operator !=(VarUShort left, VarUShort right)

Parameters​

left VarUShort

right VarUShort

Returns​

bool

  • Constructors
    • VarUShort(ushort)
  • Fields
    • MaxSize
  • Properties
    • Value
  • Methods
    • Equals(VarUShort)
    • Equals(object?)
    • GetHashCode()
    • SizeOf(ushort)
    • ToString()
  • Operators
    • operator ==(VarUShort, VarUShort)
    • implicit operator ushort(VarUShort)
    • implicit operator VarUShort(ushort)
    • operator !=(VarUShort, VarUShort)