C#: How can I write a combination of text and binary data to a file?
<p>My people need me to output a file with a combination of text strings (with each character stored as a 2-digit hex value) and ushorts (with each 16-bit ushort stored as a 4-digit hex value).</p>

<p>I was trying to do this with <code>StreamWriter</code>, but each number gets written to the file digit-by-digit...  So for example, a value of 257 gets written as 32 35 37.  I need it to be written as 01 01.  </p>

<p>Maybe I can use <code>StreamWriter</code> and <code>BinaryWriter</code> to write to the same file?  I haven't been able to figure this out though...</p>

<p>Any ideas?  </p>
