Friday, August 14, 2009

What is the namespace of StringBuilder ?

The System.Text is the namespace are used in StringBuilder

The System.Text.StringBuilder class can be used when you want to modify a string without creating a new object. For example, using the StringBuilder class can boost performance when concatenating many strings together in a loop.

You can create a new instance of the StringBuilder object by initializing your variable with one of the overloaded constructor methods, as illustrated in the following code example.


[ C# ]
StringBuilder myStringBuilder = new StringBuilder ( "Hello World!" );

No comments: