Just as we add items to an ArrayList, we can remove items from an ArrayList. We use the Remove, RemoveAt and RemoveRange methods to remove items from an ArrayList.
The Remove method is used to remove an item from the ArrayList. If we remove an item that doesnot exist in the ArrayList, this method will not throw any error.
To remove an item from a specific location from the ArrayList, we use RemoveAt method. In the following code example, the 4th item from the ArrayList is removed.
We send an object to be removed from the collection to the Remove method as a parameter and whereas to the RemoveAt method we send a particular index to remove an object.