3.5. Working with String Data

System.String provides a number of methods you would expect from such a utility class, including methods that return the length of the character data, find substrings within the current string, and convert to and from uppercase/lowercase. Table 3-5 lists some (but by no means all) of the interesting members.

Table 3.5. Select Members of System.String
String MemberMeaning in Life
LengthThis property returns the length of the current string.
Compare()This static method compares two strings.
Contains()This method determines whether a string contains a specific substring.
Equals()This method tests whether two string objects contain identical character data.
Format()This static method formats a string using other primitives ...

Get Pro C# 2010 and the .NET 4 Platform, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.