Removes all elements from the ArrayList.
Type Reason NotSupportedException The current instance is read-only or has a fixed size.
ArrayList.Count is set to zero, and references to other objects from elements of the collection are also released.
ArrayList.Capacity remains unchanged. To reset the capacity of the ArrayList, call ArrayList.TrimToSize or set the ArrayList.Capacity property directly. Trimming an empty ArrayList sets the capacity of the ArrayList to the default capacity.
This method is an O(n) operation, where n is ArrayList.Count.