I want to create a binary file in C#.net – the file should contain some header information
and binary data.
The CFile provides the provision to create a same file in the text mode as well as binary mode.
In C# .net a TextWriter and BinaryFormatter to do this. Is it possible to use a single stream class?
Note : Header information should be plain text.
You could use a BinaryWriter: