11 [__DynamicallyInvokable]
18 private static readonly
StringComparer _ordinal =
new OrdinalComparer(ignoreCase:
false);
20 private static readonly
StringComparer _ordinalIgnoreCase =
new OrdinalComparer(ignoreCase:
true);
32 [__DynamicallyInvokable]
35 [__DynamicallyInvokable]
44 [__DynamicallyInvokable]
47 [__DynamicallyInvokable]
56 [__DynamicallyInvokable]
59 [__DynamicallyInvokable]
68 [__DynamicallyInvokable]
71 [__DynamicallyInvokable]
74 return _ordinalIgnoreCase;
85 [__DynamicallyInvokable]
92 return new CultureAwareComparer(culture, ignoreCase);
120 string text = x as string;
123 string text2 = y as string;
130 if (comparable !=
null)
132 return comparable.CompareTo(y);
142 public new bool Equals(
object x,
object y)
148 if (x ==
null || y ==
null)
152 string text = x as string;
155 string text2 = y as string;
158 return Equals(text, text2);
176 string text = obj as string;
181 return obj.GetHashCode();
194 [__DynamicallyInvokable]
195 public abstract int Compare(
string x,
string y);
202 [__DynamicallyInvokable]
203 public abstract bool Equals(
string x,
string y);
211 [__DynamicallyInvokable]
215 [__DynamicallyInvokable]
static CultureInfo InvariantCulture
Gets the T:System.Globalization.CultureInfo object that is culture-independent (invariant).
int Compare(object x, object y)
When overridden in a derived class, compares two objects and returns an indication of their relative ...
static StringComparer InvariantCulture
Gets a T:System.StringComparer object that performs a case-sensitive string comparison using the word...
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
int GetHashCode(object obj)
When overridden in a derived class, gets the hash code for the specified object.
new bool Equals(object x, object y)
When overridden in a derived class, indicates whether two objects are equal.
Defines a generalized type-specific comparison method that a value type or class implements to order ...
static StringComparer Ordinal
Gets a T:System.StringComparer object that performs a case-sensitive ordinal string comparison.
Provides information about, and means to manipulate, the current environment and platform....
Defines methods to support the comparison of objects for equality.
Exposes a method that compares two objects.
static StringComparer Create(CultureInfo culture, bool ignoreCase)
Creates a T:System.StringComparer object that compares strings according to the rules of a specified ...
static StringComparer InvariantCultureIgnoreCase
Gets a T:System.StringComparer object that performs a case-insensitive string comparison using the wo...
static CultureInfo CurrentCulture
Gets or sets the T:System.Globalization.CultureInfo object that represents the culture used by the cu...
The exception that is thrown when one of the arguments provided to a method is not valid.
static StringComparer CurrentCulture
Gets a T:System.StringComparer object that performs a case-sensitive string comparison using the word...
Specifies that the class can be serialized.
static StringComparer OrdinalIgnoreCase
Gets a T:System.StringComparer object that performs a case-insensitive ordinal string comparison.
static StringComparer CurrentCultureIgnoreCase
Gets a T:System.StringComparer object that performs case-insensitive string comparisons using the wor...
Provides information about a specific culture (called a locale for unmanaged code development)....
Represents a string comparison operation that uses specific case and culture-based or ordinal compari...
StringComparer()
Initializes a new instance of the T:System.StringComparer class.