Mono Class Library: System.Collections.Hashtable Overview | Members

System.Collections.Hashtable.Remove Method

Removes the entry with the specified key from the current instance. [Edit]

[System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)]
public virtual void Remove (object key)

Parameters

key
The key of the entry to remove. [Edit]

Exceptions

TypeReason
ArgumentNullExceptionkey is null. [Edit]
NotSupportedExceptionThe current instance is read-only or has a fixed size. [Edit]

Remarks

Note: This method is implemented to support the IDictionary interface.

Operation
As described above.

This method uses the object.Equals(object) implementation of key to locate it in the current instance. If key is found in the current instance, the values of both key and its associated value are set to null. If key is not found in the current instance, no exception is thrown and the current instance remains unchanged.

[Edit]

Requirements

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