KGy SOFT

ListExtensionsRemoveRangeT Method

KGy SOFT Core Libraries Help
Removes count amount of items from the specified collection at the specified index.

Namespace:  KGySoft.CoreLibraries
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 6.0.0
Syntax

public static void RemoveRange<T>(
	this IList<T> collection,
	int index,
	int count
)

Parameters

collection
Type: System.Collections.GenericIListT
The list to remove the elements from.
index
Type: SystemInt32
The zero-based index of the first item to remove.
count
Type: SystemInt32
The number of items to remove.

Type Parameters

T
The type of the elements in the collection.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IListT. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions

ExceptionCondition
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.
Remarks

See Also

Reference