StringDictionary.Remove Method (String)

 

Removes the entry with the specified key from the string dictionary.

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

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

Parameters

key
Type: System.String

The key of the entry to remove.

Exception Condition
ArgumentNullException

The key is null.

NotSupportedException

The StringDictionary is read-only.

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

The key is handled in a case-insensitive manner; it is translated to lowercase before it is used to find the entry to remove from the string dictionary.

This method is an O(1) operation.

The following code example demonstrates how to add and remove elements from a StringDictionary.

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: