LiteNetLib.Utils.NetDataReader.GetUShort C# (CSharp) Method

GetUShort() public method

public GetUShort ( ) : ushort
return ushort
        public ushort GetUShort()
        {
            ushort result = BitConverter.ToUInt16(_data, _position);
            _position += 2;
            return result;
        }

Usage Example

Example #1
0
            protected TProperty[] ReadArrayHelper(TClass inf, NetDataReader r)
            {
                ushort count = r.GetUShort();
                var    arr   = GetterArr(inf);

                return(arr == null || arr.Length != count ? new TProperty[count] : arr);
            }
All Usage Examples Of LiteNetLib.Utils.NetDataReader::GetUShort