Hi follow the below steps to store binary data in .DAT / .OBJ file
1. Create .dat file or .obj file using FileStream
FileStream myFile = File.Create(@"C:\myFile.dat);
2. Create BinrayWriter Object to write binray data to .dat / .obj
BinaryWriter binaryfile = new BinaryWriter(myFile);
3. Convery Array into Object
4. Write the ArrayContent to file
binaryfile.Write(arrayobject);
Dont forget to close the files