CircularListTRemoveRange Method

Removes count amount of items from the CircularListT at the specified index.

Definition

Namespace: KGySoft.Collections
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
C#
public void RemoveRange(
	int index,
	int count
)

Parameters

index  Int32
The zero-based index of the first item to remove.
count  Int32
The number of items to remove.

Implements

ISupportsRangeListTRemoveRange(Int32, Int32)

Remarks

Removing items at the first or last positions are O(1) operations considering list size. At other positions removal is an O(n) operation, though the method is optimized for not moving more than n/2 elements.

Exceptions

ArgumentOutOfRangeExceptionindex is not a valid index in the CircularListT.
-or-
count is less than 0.
ArgumentExceptionindex and count do not denote a valid range of elements in the list.

See Also