Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class System.​Collections.​CaseInsensitiveComparer
Assembly: System.Collections.NonGeneric
Inheritance: object → CaseInsensitiveComparer
Compares two objects for equivalence, ignoring the case of strings.
Methods
public
int
Compare​(object a,
object b)
a
The first object to compare.
b
The second object to compare.
Returns A signed integer that indicates the relative values of <paramref name="a" /> and <paramref name="b" /> , as shown in the following table.
<list type="table">
<listheader>
<term> Value</term>
<description> Meaning</description>
</listheader>
<item>
<term> Less than zero</term>
<description>
<paramref name="a" /> is less than <paramref name="b" />, with casing ignored.</description>
</item>
<item>
<term> Zero</term>
<description>
<paramref name="a" /> equals <paramref name="b" />, with casing ignored.</description>
</item>
<item>
<term> Greater than zero</term>
<description>
<paramref name="a" /> is greater than <paramref name="b" />, with casing ignored.</description>
</item>
</list>
Performs a case-insensitive comparison of two objects of the same type and returns a value indicating whether one is less than, equal to, or greater than the other.
public
bool
Equals​(object obj)
Inherited from object
protected
void
Finalize​()
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object