Remove Method
Collapse the table of content
Expand the table of content

HybridDictionary.Remove Method (Object)


Removes the entry with the specified key from the HybridDictionary.

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

abstract Remove : 
        key:Object -> unit
override Remove : 
        key:Object -> unit


Type: System.Object

The key of the entry to remove.

Exception Condition

key is null.

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

If the collection is already stored in a Hashtable and the number of elements falls below the optimal size for a ListDictionary, the collection remains in the Hashtable to avoid the overhead of copying elements from the Hashtable back to a ListDictionary.

This method is an O(1) operation.

The following code example adds to and removes elements from a HybridDictionary.

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