IEqualityComparer<T> = interface
template<typename T> __interface IEqualityComparer__1 : public System::IInterface
IEqualityComparer is the generic interface used to check the equality of two values.
IEqualityComparer is implemented by classes that need to support an equality comparison for two values of the same type. Generic collections require instances of classes that implement the IEqualityComparer interface in order to provide support for custom data types. For example, the Equals method is used by TList to compare whether a given value is present in the list. Aside from checking the equality of two values, IEqualityComparer also provides a GetHashCode method that is used to generate a hash code for any value. GetHashCode is extensively used in hash based map classes like TDictionary.
Note: We recommend that the TEqualityComparer class is used as base for custom equality comparers instead of directly implementing the IEqualityComparer interface.
- System.Generics.Defaults.TEqualityComparer.operator ()