Gets a System.Globalization.SortKey object for the specified string using the specified System.Globalization.CompareOptions value.
- source
- The string for which a System.Globalization.SortKey object is obtained.
- options
- A bitwise combination of one or more of the following enumeration values that define how the sort key is calculated: CompareOptions.IgnoreCase, CompareOptions.IgnoreSymbols, CompareOptions.IgnoreNonSpace, CompareOptions.IgnoreWidth, CompareOptions.IgnoreKanaType, and CompareOptions.StringSort.
The System.Globalization.SortKey object that contains the sort key for the specified string.
Each character in a string is given several categories of sort weights, including script, alphabetic, case, and diacritic weights. A sort key is the repository of these weights for a particular string. For example, a sort key might contain a string of alphabetic weights, followed by a string of case weights, and so on. The erload:System.Globalization.CompareInfo.GetSortKey method is equivalent to the Windows API method LCMapString with the LCMAP_SORTKEY flag.