Dictionary<TKey, TValue>.Clear Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Removes all keys and values from the Dictionary<TKey, TValue>.
Assembly: mscorlib (in mscorlib.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.
Show: