Search code examples
c#.netstringbuildercapacity

Default capacity of StringBuilder


What is the default capacity of a StringBuilder?

And when should (or shouldn't) the default be used?


Solution

  • The Venerable J. Skeet has provided a good analysis of precisely this problem:

    https://jonskeet.uk/csharp/stringbuilder.html