title: Write StringBuilder to Stream
body: <p>What is the best method of writing a StringBuilder to a System.IO.Stream?</p>
  
  <p>I am currently doing:</p>
  
  <pre><code>StringBuilder message = new StringBuilder("All your base");
  message.Append(" are belong to us");
  
  System.IO.MemoryStream stream = new System.IO.MemoryStream();
  System.Text.ASCIIEncoding encoding = new ASCIIEncoding();
  stream.Write(encoder.GetBytes(message.ToString()), 0, message.Length);
  </code></pre>