System.Collections.IDictionary.Remove Method

Removes the element with the specified key from the IDictionary object.

Syntax

public void Remove (object key)

Parameters

key
The key of the element to remove.

Exceptions

TypeReason
ArgumentNullException key is null.
NotSupportedExceptionThe current instance is read-only or has a fixed size.

Remarks

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

Requirements

Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0