跳到主要内容
版本:Next

Class VarUShortExtensions

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

Writes and reads a ushort in the compact VarUShort encoding.

public static class VarUShortExtensions

Inheritance​

object ← VarUShortExtensions

Inherited Members​

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

Methods​

GetVarUShort(NetDataReader)​

Throws InvalidDataException for more than three bytes, more than 16 bits, or a stream that ends first.

public static ushort GetVarUShort(this NetDataReader reader)

Parameters​

reader NetDataReader

Returns​

ushort

PutVarUShort(NetDataWriter, ushort)​

Writes value in as few bytes as it needs.

public static void PutVarUShort(this NetDataWriter writer, ushort value)

Parameters​

writer NetDataWriter

value ushort

  • Methods
    • GetVarUShort(NetDataReader)
    • PutVarUShort(NetDataWriter, ushort)