I deal with packets to byte streams quite frequently in client/server applications. Packets are essentially data structures with an assortment of binary and ascii or whatever formatted data. Here are a couple functions you could use, and polymorhisize as you need: public int Encode( int i32Value, ref byte[] pdu, int off ) { byte[] byte32Int = new byte[ cBytesPerWord32 ]; int netValue = System.Net.IPAddress.HostToNetworkOrder( i32Value ); byte32Int = BitConverter.GetBytes( netValue ); Array.Copy( byte32Int, 0, pdu, off, cBytesPerWord32 ); return cBytesPerWord32; } public int Decode( ref byte[] pdu, int off, ref uint u32Value ) { uint netValue = BitConverter.ToUInt32( pdu, off ); u32Value = (uint)System.Net.IPAddress.NetworkToHostOrder( (int) netValue ); return cBytesPerWord32; } Although the function above only deals with 32-bit uint's you can imagine how easy it is to add support for 16-bit and 64-bit integers/unsigned integers. Strings are variable length in most cases otherwise a simple Array.Copy() would suffice. So if you have to pass strings, at a minimum you'll be best served with a length byte and quite possible some sort of a type or tag byte - especialy if you have lots of string elements. That way you can handle strings in any order. Good luck Mike Luster CTI/IVR/Telephony SME