NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Hashtable.KeyEquals

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;

Parameters

item
The Object to compare with key.
key
The key in the Hashtable to compare with item.

Return Value

true if item and key are equal; otherwise, false.

Exceptions

Exception Type Condition
ArgumentNullException item is a null reference (in Visual Basic Nothing).

-or-

key is a null reference (Nothing).

Remarks

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).

See Also

Hashtable Class | Hashtable Members | System.Collections Namespace | Object | Compare | Equals