System.Globalization.SortKey Class

Assembly: Mscorlib.dll
Namespace: System.Globalization
Summary
Maps strings to their sort keys.
C# Syntax:
[Serializable]
public class SortKey
Remarks
Each character in a string is given several categories of sort weights, including script, alphabetic, case, and diacritic weights. A sort key serves as 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. SortKey is equivalent to the Windows API method LCMapString with the LCMAP_SORTKEY flag.
See also:
System.Globalization Namespace

System.Globalization.SortKey Member List:

Public Properties
KeyData Read-only

Gets the byte array representing the current SortKey.
OriginalString Read-only

Gets the original string used to create the current SortKey.
Public Methods
Compare Compares two sort keys.
Equals Overridden:
Determines whether the specified object is the same instance as the current SortKey.
GetHashCode Overridden:
Serves as a hash function for the current SortKey, suitable for use in hashing algorithms and data structures, such as a hash table.
GetType
(inherited from System.Object)
See base class member description: System.Object.GetType

Derived from System.Object, the primary base class for all objects.
ToString Overridden:
Returns a string that represents the current SortKey.
Protected Methods
Finalize
(inherited from System.Object)
See base class member description: System.Object.Finalize

Derived from System.Object, the primary base class for all objects.
MemberwiseClone
(inherited from System.Object)
See base class member description: System.Object.MemberwiseClone

Derived from System.Object, the primary base class for all objects.

Hierarchy:


System.Globalization.SortKey Member Details

Property: KeyData (read-only)
Summary
Gets the byte array representing the current SortKey.
C# Syntax:
public virtual byte[] KeyData {get;}

Return to top


Property: OriginalString (read-only)
Summary
Gets the original string used to create the current SortKey.
C# Syntax:
public virtual string OriginalString {get;}

Return to top


Method: Compare(
   SortKey sortkey1,
   SortKey sortkey2
)
Summary
Compares two sort keys.
C# Syntax:
public static int Compare(
   SortKey sortkey1,
   SortKey sortkey2
);
Parameters:

sortkey1

The first sort key to compare.

sortkey2

The second sort key to compare.

Return Value:


Value Condition
Zero The two sort keys are equal.
Less than zero is less than .
Greater than zero is greater than .

Return to top


Overridden Method: Equals(
   object value
)
Summary
Determines whether the specified object is the same instance as the current SortKey.
C# Syntax:
public override bool Equals(
   object value
);
Parameters:

value

The object to compare with the current SortKey.

Return Value:
true if the specified object is the same instance as the current SortKey; otherwise, false.
Remarks
This method overrides Object.Equals.
See also:
Object.Equals

Return to top


Method: Finalize()
Inherited
See base class member description: System.Object.Finalize
C# Syntax:
~SortKey();

For more information on members inherited from System.Object click on the link above.

Return to top


Overridden Method: GetHashCode()
Summary
Serves as a hash function for the current SortKey, suitable for use in hashing algorithms and data structures, such as a hash table.
C# Syntax:
public override int GetHashCode();
Return Value:
A hash code for the current SortKey.
Remarks
This method overrides Object.GetHashCode.

This method generates the same hash code for two objects that are equal according to the SortKey.Equals method.

See also:
Object.GetHashCode | Hashtable | SortKey.Equals

Return to top


Method: GetType()
Inherited
See base class member description: System.Object.GetType
C# Syntax:
public Type GetType();

For more information on members inherited from System.Object click on the link above.

Return to top


Method: MemberwiseClone()
Inherited
See base class member description: System.Object.MemberwiseClone
C# Syntax:
protected object MemberwiseClone();

For more information on members inherited from System.Object click on the link above.

Return to top


Overridden Method: ToString()
Summary
Returns a string that represents the current SortKey.
C# Syntax:
public override string ToString();
Return Value:
A string that represents the current SortKey.
Remarks
This method overrides Object.ToString.
See also:
Object.ToString | String

Return to top


Top of page

Copyright (c) 2002 Microsoft Corporation. All rights reserved.