![]() |
VOOZH | about |
public void RemoveAt (int index);Here, index is the zero-based index of the element to remove. Exception: This method will give ArgumentOutOfRangeException if the index is less than zero OR index is equal to or greater than Count. Below given are some examples to understand the implementation in a better way: Example 1: Output:
Count : 5 A B C D E Count : 4 A B D EExample 2:
Unhandled Exception: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: indexNote: This method is an O(n) operation, where n is Count. Reference: