WHAT’S IN THIS CHAPTER?
WROX.COM CODE DOWNLOADS FOR THIS CHAPTER
Strings have been used consistently since the beginning of this book, but you might not have realized that the stated mapping that the
string keyword in C# actually refers to is the
System.String .NET base class.
System.String is a very powerful and versatile class, but it is by no means the only string-related class in the .NET armory. This chapter begins by reviewing the features of
System.String and then looks at some nifty things you can do with strings using some of the other .NET classes — in particular those in the
System.Text.RegularExpressions namespaces. This chapter covers the following areas:
Stringclass can be very inefficient. When you find yourself in this kind of situation, another class,
System.Text.StringBuilder, is more suitable because it has been designed exactly for this scenario.