Supplies a hashcode for the implementing class.
IHashCodeProvider
[Visual Basic] Public Interface IHashCodeProvider [C#] public interface IHashCodeProvider [C++] public __gc __interface IHashCodeProvider
[JScript] In JScript, you can use the interfaces in the NGWS frameworks, but you cannot define your own.
Class | Description |
---|---|
CaseInsensitiveHashCodeProvider | Supplies a hashcode for the implementing class. The hashing algorithm ignores the case for Strings. The default for Hashtables is to use case sensitive hashcodes. This class is typically used in conjunction with CaseInsensitiveComparer |
The IHashCodeProvider interface is used in conjunction with Hashtable. The objects used as keys by a Hashtable must implement or inherit the GetHashCode and Equals methods. However, if the Hashtable constructor is passed a reference to an object that implements both the IHashCodeProvider interface and the IComparer interface, then GetHashCode and Compare can be used instead.
Namespace: System.Collections
Assembly: mscorlib.dll
IHashCodeProvider Members | System.Collections Namespace | Hashtable | IHashCodeProvider | IComparer