IDictionary.Remove Method

DictionaryBase.IDictionary.Remove Method (Object)

 

Removes the element with the specified key from the DictionaryBase.

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

private abstract Remove : 
        key:Object -> unit
private 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 DictionaryBase is read-only.

-or-

The DictionaryBase has a fixed size.

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

This method is an O(1) operation.

The following code example implements the DictionaryBase class and uses that implementation to create a dictionary of String keys and values that have a Length of 5 characters or less.

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:
© 2016 Microsoft