title: C# and .NET: How to serialize a structure into a byte[] array, using BinaryWriter?
body: <p>How to serialize a rather complex structure into a byte[] array, using BinaryWriter?</p>
  
  <p><strong>Update:</strong></p>
  
  <ul>
  <li><p>For this to work, every structure (and sub-structure?) must be decorated with the [Serializable] attribute.</p></li>
  <li><p>I do not need to implement the ISerializable interface, as this is designed to give an object control over its own serialization.</p></li>
  </ul>