C# class to byte stream
<p>What is the correct way to convert my class to/from a byte array? I want to be able to do thing like save it to a file as simply as possible.</p>

<p>Should I make it serializable?<br>
Should I just supply a function that returns a byte array? Or maybe a MemoryStream?<br>
Something else?</p>

<p>I am not overly familiar with C# file handling, so if the answer could also show what the common way of writing binary data to a file is, I would appreciate it.</p>

<p><strong>Edit</strong> I see from the answers that I am misunderstood. I have a class. I have a format I want to save it in binary form in. I want to know what the correct way is to expose this binary representation. I need full control of the format, not .NET doing it for me (I will be reading it later in c++)</p>
