System.Globalization.SortKey.Compare Method

Compares two sort keys.

Syntax

public static int Compare (SortKey sortkey1, SortKey sortkey2)

Parameters

sortkey1
The first sort key to compare.
sortkey2
The second sort key to compare.

Returns

A signed integer that indicates the relationship between sortkey1 and sortkey2.

Less than zero

sortkey1 is less than sortkey2.

Zero

sortkey1 is equal to sortkey2.

Greater than zero

sortkey1 is greater than sortkey2.

Remarks

The SortKey.Compare(SortKey, SortKey) method compares the SortKey.KeyData properties of the sortkey1 and sortkey2 parameters. The method yields the same results as the CompareInfo.Compare(string, string) method.

Requirements

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