Clear Method
Collapse the table of content
Expand the table of content

ICollection<T>.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>.

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

void Clear()

ExceptionCondition
NotSupportedException

The ICollection<T> is read-only.

Count must be set to 0, and references to other objects from elements of the collection must be released.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2016 Microsoft