Export (0) Print
Expand All

IEqualityComparer Interface

Defines methods to support the comparison of objects for equality.

Namespace:  System.Collections
Assembly:  mscorlib (in mscorlib.dll)

[ComVisibleAttribute(true)]
public interface IEqualityComparer

The IEqualityComparer type exposes the following members.

  NameDescription
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360EqualsDetermines whether the specified objects are equal.
Public methodSupported by Silverlight for Windows PhoneSupported by Xbox 360GetHashCodeReturns a hash code for the specified object.
Top

This interface allows the implementation of customized equality comparison for collections. That is, you can create your own definition of equality, and specify that this definition be used with a collection type that accepts the IEqualityComparer interface.

This interface supports only equality comparisons. Customization of comparisons for sorting and ordering is provided by the IComparer interface.

For the generic version of this interface, see System.Collections.Generic.IEqualityComparer<T>.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft