- key
- The object for which a hash code is to be returned.
The hash code for key.
Type Reason ArgumentNullException key is null.
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.