StringComparer Methods

The StringComparer type exposes the following members.

  Name Description
Public method Compare(Object, Object) When overridden in a derived class, compares two objects and returns an indication of their relative sort order.
Public method Compare(String, String) When overridden in a derived class, compares two strings and returns an indication of their relative sort order.
Public method Static member Create Creates a StringComparer object that compares strings according to the rules of a specified culture.
Public method Equals(Object) Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method Equals(Object, Object) When overridden in a derived class, indicates whether two objects are equal.
Public method Equals(String, String) When overridden in a derived class, indicates whether two strings are equal.
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode() Serves as the default hash function. (Inherited from Object.)
Public method GetHashCode(Object) When overridden in a derived class, gets the hash code for the specified object.
Public method GetHashCode(String) When overridden in a derived class, gets the hash code for the specified string.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Top

  Name Description
Explicit interface implemetation Private method IComparer.Compare Compares two objects and returns a value that indicates whether one is less than, equal to, or greater than the other.
Explicit interface implemetation Private method IEqualityComparer.Equals Determines whether the specified objects are equal.
Explicit interface implemetation Private method IEqualityComparer.GetHashCode Returns a hash code for the specified object.
Top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft