When implemented by a class, removes all items from the collection.
[Visual Basic]
Sub Clear()
Implementations of this method can vary in how they handle
the Count and the capacity of a
collection. Typically, the count is set to zero. The capacity
can be set to zero or a default value
, or it can remain
unchanged.
Exception Type | Condition |
---|---|
System.NotSupportedException | The collection is read-only. |
ICollection2 Interface | ICollection2 Members | Foley.Utilities.Collections Namespace