Hashtable.GetHash(Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns the hash code for the specified key.
protected:
virtual int GetHash(System::Object ^ key);
protected virtual int GetHash (object key);
abstract member GetHash : obj -> int
override this.GetHash : obj -> int
Protected Overridable Function GetHash (key As Object) As Integer
Parameters
Returns
The hash code for key
.
Exceptions
key
is null
.
Remarks
If the hash table was created with a specific IHashCodeProvider implementation, this method uses that hash code provider; otherwise, it uses the Object.GetHashCode implementation of key
.
This method is an O(1)
operation.
Applies to
See also
Sodelujte z nami v storitvi GitHub
Vir za to vsebino najdete v storitvi GitHub, kjer lahko tudi ustvarite in pregledate težave in zahtevke za uveljavitev sprememb. Če želite več informacij, glejte naš vodnik za sodelavce.