Hashtable.Remove Method (Object)

 

Removes the element with the specified key from the Hashtable.

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

abstract Remove : 
        key:Object -> unit
override Remove : 
        key:Object -> unit

Parameters

key
Type: System.Object

The key of the element to remove.

Exception Condition
ArgumentNullException

key is null.

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.

The following example shows how to remove elements from the Hashtable.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Return to top
Show: