System.Collections.Comparer Class

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

See Also: Comparer Members

Syntax

[System.Runtime.InteropServices.ComVisible(true)]
public sealed class Comparer : IComparer, System.Runtime.Serialization.ISerializable

Remarks

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.

Requirements

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