Dictionary<TKey, TValue>.Clear Method
Removes all keys and values from the Dictionary<TKey, TValue>.
Assemblies: mscorlib (in mscorlib.dll)
System.Collections (in System.Collections.dll)
The Count property is set to 0, and references to other objects from elements of the collection are also released. The capacity remains unchanged.
This method is an O(n) operation, where n is the capacity of the dictionary.