Im trying to write some come but it isnt coming along. This is what i have/want: int[] myIntArray int[] myintArray2 Bitmap myBitmap // All of these have some value(s) // I want to write them to a file using this protocol (byte sizes are fixed): (4 bytes) Size of myIntArray (4 bytes) Position of myIntArray in the file (4 bytes) Size of myIntArray2 (4 bytes) Position of myIntArray2 in the file (4 bytes) Size of myBitmap (4 bytes) Position of myBitmap in the file (lots of bytes, 4 per element) myIntArray (lots of bytes, 4 per element) myIntArray2 (lots of bytes, preferably PNG fromat) myBitmap I'd really apreciate any help
BinaryWriter will do the job for you. Here is a simple sample Code: FileStream fs = File.Create(Server.MapPath("test.bin")); BinaryWriter bw = new BinaryWriter(fs); int i = 10; bw.Write(i); bw.Close(); fs.Close();