System.Globalization.CompareInfo.GetSortKey Method

Gets the sort key for the specified string.

Syntax

public virtual SortKey GetSortKey (string source)

Parameters

source
The string for which a System.Globalization.SortKey object is obtained.

Returns

The System.Globalization.SortKey object that contains the sort key for the specified string.

Remarks

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.

Requirements

Namespace: System.Globalization
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0