Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[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)
Syntax
'Declaration
Public Sub Remove ( _
key As Object _
)
public void Remove(
Object key
)
public:
virtual void Remove(
Object^ key
) sealed
abstract Remove :
key:Object -> unit
override Remove :
key:Object -> unit
public final function Remove(
key : Object
)
Parameters
- key
Type: System. . :: . .Object
The key of the element to remove.
Implements
IDictionary. . :: . .Remove(Object)
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | key is null Nothing nullptr unit a null reference (Nothing in Visual Basic) . |
NotSupportedException | The Hashtable is read-only. -or- The Hashtable has a fixed size. |
Remarks
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.