System.Collections.Comparer Class

Compares two objects for equivalence, where string comparisons are case-sensitive.

See Also: Comparer Members


public sealed class Comparer : IComparer, System.Runtime.Serialization.ISerializable


This class is the default implementation of the IComparer interface. The CaseInsensitiveComparer class is the implementation of the IComparer interface that performs case-insensitive string comparisons.

Comparison procedures use the System.Threading.Thread.CurrentCulture of the current thread unless otherwise specified. String comparisons might have different results depending on the culture. For more information on culture-specific comparisons, see the System.Globalization namespace and Encoding and Localization.

Thread Safety

All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.


Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0,,