CircularSortedListTKey, TValueClear Method

Removes all items from the CircularSortedListTKey, TValue.

Definition

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

Implements

ICollectionTClear
IDictionaryClear
IListClear

Remarks

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

This method is an O(n) operation, where n is Count.

Capacity remains unchanged. To reset the capacity of the CircularSortedListTKey, TValue 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