Mono Class Library: System.Collections.IList Overview | Members

System.Collections.IList.Clear Method

Removes all items from the current instance.

public void Clear ()

Exceptions

TypeReason
NotSupportedExceptionThe current instance is read-only.

Remarks

Operation
As described above.

Note to Inheritors
Implementations of this method can vary in how a call to this method affects the capacity of a list. Typically, the count is set to zero. The capacity can be set to zero, some default, or remain unchanged.

Usage
Use this method to delete all values from the current instance.

Requirements

Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0