O'Reilly logo

A Programmer's Guide to .NET by Alexei Fedorov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

3.11. System.Text namespace

The System.Text namespace contains classes representing various character encoding and conversions, as well as providing helper classes for manipulating and formatting String objects.

The StringBuilder class can be used in conjunction with the String class to manipulate a string. This class is useful in situations when we need to modify a contents of a String – insert, replace, or remove characters – without creating a new string.

To perform the desired operations we use the Insert, Replace, and Remove methods of the StringBuilder class. Access to the character in the String is provided by the Chars property, which allows us to manipulate strings on a per character basis.

The System.Text namespace also contains several ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required