System.Collections.Generic.Dictionary<TKey,TValue>.Clear Method
Removes all elements from the dictionary.

Syntax

public void Clear ()

Remarks

Note:

This method is implemented to support the IDictionary interface.

ICollection<TKey>.Count gets set to zero, and references to other objects from elements of the collection are also released. The capacity remains unchanged.

Requirements

Namespace: System.Collections.Generic
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0