Clears the contents of the ArrayList.
[Visual Basic] Overridable Public Sub Clear() [C#] public virtual void Clear(); [C++] public: virtual void Clear(); [JScript] public function Clear();
None.
Exception Type | Condition |
---|---|
NotSupportedException | The ArrayList is read-only.
-or- The ArrayList has a fixed size. |
This method can be overridden by a derived class.
Count is set to 0. You need to call TrimToSize to trim your ArrayList if required.
ArrayList Class | ArrayList Members | System.Collections Namespace