The StringBuilder Class
Whereas the String class represents an immutable string, the StringBuilder class represents a mutable string. It is recommended that you use the StingBuilder class when you need to manipulate a string often. The StringBuilder class is defined in the System.Text namespace.
Constructing a StringBuilder is done by using one of its many overloaded constructors. The constructors’ parameters allow you to specify values for the following four properties:
Capacity— The Capacity property specifies the initial size of the character array member contained by the StringBuilder class. The default value is 16. The StringBuilder doubles the size of the character array when the existing size is smaller than needed by an operation such ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access