Casting a byte array to a managed structure
Update: Answers to this question helped me code the open sourced project AlicanC's Modern Warfare 2 Tool on GitHub . You can see how I am reading these packets in MW2Packets.cs and the extensions I've coded to read big endian data in Extensions.cs . I am capturing UDP packets of Call of Duty: Modern Warfare 2 using Pcap.Net in my C# application. I receive a byte[] from the library. I tried to parse it like a string, but that didn't work well. The byte[] I have has a generic packet header, then another header specific to the packet type then info about each player in the lobby. A helpful person