Mono Class Library: System.Collections.Hashtable Overview | Members

System.Collections.Hashtable.GetHash Method

Generates a hash code for the specified key in the current instance. [Edit]

protected virtual int GetHash (object key)

Parameters

key
The object whose hash code is to be generated. [Edit]

Returns

A int containing the hash code for key. [Edit]

Exceptions

TypeReason
ArgumentNullExceptionkey is null. [Edit]

Remarks

This method is accessible only through this class or a derived class.

Operation
As described above.

If the current instance was instantiated with a specific IHashCodeProvider implementation, this method uses that hash code provider; otherwise, it uses the object.GetHashCode implementation of key .

[Edit]

Requirements

Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0