Performing Culture-Insensitive String Operations
Most .NET Framework methods that perform culture-sensitive string operations by default provide method overloads that allow you to explicitly specify the culture to use by passing a CultureInfo parameter. These overloads allow you to eliminate cultural variations in case mappings and sorting rules and guarantee culture-insensitive results by specifying the CultureInfo.InvariantCulture property for the CultureInfo parameter.
This section provides the following topics to demonstrate how to perform culture-insensitive string operations using .NET Framework methods that are culture-sensitive by default.
In This Section
- Performing Culture-Insensitive String Comparisons
- Performing Culture-Insensitive Case Changes
- Performing Culture-Insensitive String Operations in Collections
Describes how to use the CaseInsensitiveComparer Class, class, SortedList Class, ArrayList.Sort Method and CollectionsUtil.CreateCaseInsensitiveHashtable Method to perform culture-insensitive operations in collections.
- Performing Culture-Insensitive String Operations in Arrays
- Performing Culture-Insensitive Operations in the RegularExpressions Namespace
Describes how to perform culture-insensitive string operations using methods in the System.Text.RegularExpressions Namespace.