Represents a custom constructor for strings and is used in conjunction with the String class to carry out modifications upon strings.
Object
StringBuilder
[Visual Basic] NotInheritable Public Class StringBuilder [C#] public sealed class StringBuilder [C++] public __gc __sealed class StringBuilder [JScript] public class StringBuilder
It is convenient for situations in which it is desirable to modify a string, perhaps by removing, replacing, or inserting characters, without creating a new string subsequent to each modification. The methods contained within this class do not return a new StringBuilder object unless specified otherwise.
Note that Equals has not been overridden in StringBuilder (as it is in String), because the contract with Equals() states that if a.Equals(b) is true it will always be true. Because the string of characters contained in a StringBuilder can change, it is not possible to implement Equals based on the content of a StringBuilder.
See the comment about string comparison in the String topic.
Namespace: System.Text
Assembly: mscorlib.dll