IEqualityComparer Interface
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Defines methods to support the comparison of objects for equality.
Assembly: mscorlib (in mscorlib.dll)
The IEqualityComparer type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Equals | Determines whether the specified objects are equal. |
![]() | GetHashCode | Returns a hash code for the specified object. |
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>.
