title: MaxCapacity of StringBuilder
body: <p>why does this code throw an OutOfMemoryException on i = 690864192?</p>
  
  <pre><code>StringBuilder sb = new StringBuilder();
                  for (int i = 0; i &lt; Int32.MaxValue; i++)
                  {
                      sb.Append("s");
                  }
                  Console.WriteLine(sb.ToString());
                  Console.Read();
  </code></pre>
  
  <p>The default capacity is 16 chars, but this grows at it needs to up to the max which is int.MaxValue = 2,147,483,647. So why is it when number of chars is 690,864,192 which is much less than the max capacity, does it throw an exception?</p>