IEqualityComparer

IEqualityComparer


Defines methods to support the comparison of values for equality.


Public:

Methods:

NameDescription
 Equals Determines whether the specified values are equal.  
 GetHashCode Returns a hash code for the specified value.  

Remarks

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. In the VBCorLib Framework, constructor of the Hashtable collection type accepts this interface.

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

A default implementation can be accessed using EqualityComparer.Default.

See Also

Project CorLib Overview

Class IEqualityComparer Overview