How do I load a byte[] array into a structure in C#?
问题 Consider following structure where the length of both username and password is 17: struct LoginPacket { public int unk1; public string username; public string password; } Also this byte array 00 00 00 00 6A 6D 32 6D 65 00 72 00 7A 76 72 00 98 FD 18 00 A0 68 65 72 65 49 73 70 61 73 73 00 00 00 00 00 FF FF 31 2E 30 30 2E 30 30 00 00 00 C7 9D 72 00 04 00 00 31 2E 31 30 2E 32 37 00 0C 2C F6 24 16 2C F6 24 16 Is it possible to load this byte array into the above structure? There is something