System.StringComparer Members

The members of System.StringComparer are listed below.

See Also: Inherited members from System.Object

Protected Constructors

Initializes a new instance of the StringComparer class.

Public Properties

[read-only]
static
CurrentCultureStringComparer.

Gets a StringComparer object that performs a case-sensitive string comparison using the word comparison rules of the current culture.

[read-only]
static
CurrentCultureIgnoreCaseStringComparer.

Gets a StringComparer object that performs case-insensitive string comparisons using the word comparison rules of the current culture.

[read-only]
static
InvariantCultureStringComparer.

Gets a StringComparer object that performs a case-sensitive string comparison using the word comparison rules of the invariant culture.

[read-only]
static
InvariantCultureIgnoreCaseStringComparer.

Gets a StringComparer object that performs a case-insensitive string comparison using the word comparison rules of the invariant culture.

[read-only]
static
OrdinalStringComparer.

Gets a StringComparer object that performs a case-sensitive ordinal string comparison.

[read-only]
static
OrdinalIgnoreCaseStringComparer.

Gets a StringComparer object that performs a case-insensitive ordinal string comparison.

Public Methods

Compare(object, object) : int

When overridden in a derived class, compares two objects and returns an indication of their relative sort order.

abstract
Compare(string, string) : int

When overridden in a derived class, compares two strings and returns an indication of their relative sort order.

static
Create(System.Globalization.CultureInfo, bool) : StringComparer

Creates a StringComparer object that compares strings according to the rules of a specified culture.

Equals(object, object) : bool

When overridden in a derived class, indicates whether two objects are equal.

abstract
Equals(string, string) : bool

When overridden in a derived class, indicates whether two strings are equal.

GetHashCode(object) : int

When overridden in a derived class, gets the hash code for the specified object.

abstract
GetHashCode(string) : int

When overridden in a derived class, gets the hash code for the specified string.