Basic String Operations in the .NET Framework
Applications often respond to users by constructing messages based on user input. For example, it is not uncommon for Web sites to respond to a newly logged-on user with a specialized greeting that includes the user's name. Several methods in the System.String and System.Text.StringBuilder classes allow you to dynamically construct custom strings to display in your user interface. These methods also help you perform a number of basic string operations like creating new strings from arrays of bytes, comparing the values of strings, and modifying existing strings.
In This Section
- Creating New Strings in the .NET Framework
Describes basic ways to convert objects into strings and to combine strings.
- Trimming and Removing Characters from Strings in the .NET Framework
Describes how to trim or remove characters in a string.
- Padding Strings in the .NET Framework
Describes how to insert characters or empty spaces into a string.
- Comparing Strings in the .NET Framework
Describes how to compare the contents of two or more strings.
- Changing Case in the .NET Framework
Describes how to change the case of characters within a string.
- Using the StringBuilder Class in the .NET Framework
Describes how to create and modify dynamic string objects with the StringBuilder class.
- How to: Perform Basic String Manipulations in the .NET Framework
Demonstrates the use of basic string operations.