byte[] packetData = new byte[4] { 0x01, 0x02, 0x03, 0x04 }; PacketReader reader = new PacketReader(packetData); ushort myNumber = reader.ReadUInt16(); Console.WriteLine(myNumber); // Output: 513
using Server.Network; byte[] packetData = new byte[2] { 0x00, 0x0A }; PacketReader reader = new PacketReader(packetData); ushort myNumber = reader.ReadUInt16(); Console.WriteLine(myNumber); // Output: 10This example reads an unsigned 16-bit integer from a packet with two bytes (0x00 and 0x0A), using the PacketReader class provided by the Server.Network package. Based on the usage of the PacketReader class and the fact that it is used in conjunction with a Server.Network namespace, it is likely that the package library being used is a networking library for C# developers.