CFile equivalent in C#.net
<p>I want to create a binary file in C#.net - the file should contain some header information
and binary data.</p>

<p>The CFile provides the provision to create a same file in the text mode as well as binary mode.</p>

<p>In C# .net a TextWriter and BinaryFormatter to do this. Is it possible to use a single stream class?</p>

<p>Note : Header information should be plain text.</p>
