Share via


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 IDictionary object.

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

Syntax

'Declaration
Sub Remove ( _
    key As Object _
)
void Remove(
    Object key
)
void Remove(
    Object^ key
)
abstract Remove : 
        key:Object -> unit 
function Remove(
    key : Object
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

key is null Nothing nullptr unit a null reference (Nothing in Visual Basic) .

NotSupportedException

The IDictionary object is read-only.

-or-

The IDictionary 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.

.NET Framework Security

See Also

Reference

IDictionary Interface

System.Collections Namespace