Clear Method

SortedDictionary(Of 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 elements from the SortedDictionary(Of TKey, TValue).

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

'Declaration
Public Sub Clear

Implements

ICollection(Of T).Clear
IDictionary.Clear

The Count property is set to 0, and references to other objects from elements of the collection are also released.

This method is an O(1) operation, since the root of the internal data structures is simply released for garbage collection.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft