Remove Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Removes the element with the specified key from the Hashtable.

Namespace:  System.Collections
Assembly:  mscorlib (in mscorlib.dll)

public void Remove(
	Object key
)

Parameters

key
Type: System..::..Object
The key of the element to remove.

Implements

IDictionary..::..Remove(Object)

ExceptionCondition
ArgumentNullException

key is nullNothingnullptrunita null reference (Nothing in Visual Basic).

NotSupportedException

The Hashtable is read-only.

-or-

The Hashtable has a fixed size.

If the Hashtable does not contain an element with the specified key, the Hashtable remains unchanged. No exception is thrown.

This method is an O(1) operation.

Show: