Cool thanks
The first method I used for a protocol I wrote myself. Storing the packet structure in a struct and then doing a "Managed Memcopy" - for want of better words - works well. Because when I was developing the protocol, I could just move/add/whatever the fields in the stuct and my Serialization/DeSerialization to send it off via a socket never needed updating. *But* this packet structure never changed in length.
Obviously this won't work for a variable length packet. I think the having lots of byte[]'s for each field and then encapsulating them into the class properties is a good method. Buffer.BlockCopy is kick-ass, I never knew about it originally...
When I get a chance I'm going to benchmark these against each other, in terms of execution time. I'm not concerned with memory usage.