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