public static void Decode(byte[] buffer, INetPacket packet) { ushort IdSize = sizeof(ushort); ByteArray bytes = new ByteArray(buffer, IdSize); packet.decode(bytes); }