Compares a specific Object with a specific key in the Hashtable.
[Visual Basic] Overridable Protected Function KeyEquals( _ ByVal item As Object, _ ByVal key As Object _ ) As Boolean [C#] protected virtual bool KeyEquals( object item, object key ); [C++] protected: virtual bool KeyEquals( Object* item, Object* key ); [JScript] protected function KeyEquals( item : Object, key : Object ) : Boolean;
true if item and key are equal; otherwise, false.
Exception Type | Condition |
---|---|
ArgumentNullException | item is a null reference (in Visual Basic Nothing).
-or- key is a null reference (Nothing). |
This method can be overridden by a derived class.
If the hashtable was instantiated with a specific IComparer implementation, this method will use that comparer; that is, Compare (item, key). Otherwise, it uses item. Equals (key).
Hashtable Class | Hashtable Members | System.Collections Namespace | Object | Compare | Equals