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