CircularListTReset Method

Removes all items from the list and resets the Capacity of the list to 0.

Definition

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

Remarks

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

This method is an O(1) operation.

Calling Clear and then TrimExcess methods also resets the list, though Clear is an O(n) operation, where n is Count.

See Also