IEqualityComparer |
Name | Description |
---|---|
Equals | Determines whether the specified values are equal. |
GetHashCode | Returns a hash code for the specified value. |
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.