CircularListTClear Method

Removes all items from the CircularListT.

Definition

Namespace: KGySoft.Collections
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public void Clear()

Implements

ICollectionTClear
IListClear

Remarks

Count is set to 0, and references to other objects from elements of the collection are also released.

If T is a value type and contains no managed references, then this method is an O(1) operation. Otherwise, this method is an O(n) operation, where n is Count.

Capacity remains unchanged. To reset the capacity of the list to 0 as well, call the Reset method instead, which is an O(1) operation. Calling TrimExcess after Clear also resets the list, though Clear has more cost.

See Also