See Also: IHashCodeProvider Members
The IHashCodeProvider interface is used in conjunction with the Hashtable class. The objects used as keys by a Hashtable object must override the object.GetHashCode and object.Equals(object) methods. object.GetHashCode or the key's implementation of object.GetHashCode is used as the hash code provider. object.Equals(object) or the key's implementation of object.Equals(object) is used as the comparer.
However, some overloads of the Hashtable constructor take a parameter that is an IHashCodeProvider implementation, or a parameter that is an IComparer implementation, or both. If an IHashCodeProvider implementation is passed to the constructor, the IHashCodeProvider.GetHashCode(object) method of that implementation is used as the hash code provider. If an IComparer implementation is passed to the constructor, the IComparer.Compare(object, object) method of that implementation is used as the comparer.