Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

CollectionBase::Clear Method ()

 

Removes all objects from the CollectionBase instance. This method cannot be overridden.

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

public:
virtual void Clear() sealed

Implements

IList::Clear()

Count is set to zero.

This method is an O(n) operation, where n is Count.

To perform custom actions before or after the collection is cleared, override the protected OnClear or OnClearComplete method.

Universal Windows Platform
Available since 10
.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft