System.Collections.ObjectModel.Collection<T>.ClearItems Method

Removes all elements from the System.Collections.ObjectModel.Collection`1.

Syntax

protected virtual void ClearItems ()

Remarks

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

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

Requirements

Namespace: System.Collections.ObjectModel
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0