Method RemoveRange
RemoveRange(int, int)
Removes N elements of a range. Shifts everything above the range down by N and decrements the length by N.
Declaration
public void RemoveRange(int index, int count)
Parameters
Type | Name | Description |
---|---|---|
int | index | The first index of the range to remove. |
int | count | The number of elements to remove. |
Remarks
If you don't care about preserving the order of the elements, RemoveAtSwapBack
is a more efficient way to remove elements.
Exceptions
Type | Condition |
---|---|
ArgumentOutOfRangeException | Thrown if the index is out of bounds. |