ICollection(TValue).Clear Method

Dictionary<TKey, TValue>.ValueCollection.ICollection<TValue>.Clear Method

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Removes all items from the ICollection<T>. This implementation always throws NotSupportedException.

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

void ICollection<TValue>.Clear()

Implements

ICollection<T>.Clear()

ExceptionCondition
NotSupportedException

Always thrown.

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

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft