List<T> is very easy to use. There is a huge list of different operations that you can perform with it. We have already spoken about adding an element at the end of a List. Very briefly, let's look at the common ones that we will be possibly using at later stages:
- Add: This adds an object at the end of List<T>.
- Remove: This removes the first occurrence of a specific object from List<T>.
- Clear: This removes all elements from List<T>.
- Contains: This determines whether an element is in List<T> or not. It is very useful to check whether an element is stored in the list.
- Insert: This inserts an element into List<T> at the specified index.
- ToArray: This copies the elements of List<T> to a new array.
You don't need ...