title: Can a byte[] buffer for a MemoryStream have variable size?
body: <p>I'm serializing an object to a <code>byte[]</code> using <code>MemoryStream</code>:</p>
  
  <pre><code>byte[] serialized = new byte[1000];
  using (MemoryStream stream = new MemoryStream(serialized))
      using (TextWriter textWriter = new StreamWriter(stream))
          serializer.Serialize(textWriter, stuffToSerialize);
  </code></pre>
  
  <p>is there any way I can set <code>'serialized'</code> to grow according to the size of the <code>stuffToSerialize</code>?</p>