The .NET Framework Class Library provides several classes, called collections, used to store groups of related objects. These classes provide efficient methods that organize, store and retrieve your data without requiring knowledge of how the data is being stored. This reduces app development time.
You’ve used arrays to store sequences of objects. Arrays do not automatically change their size at execution time to accommodate additional elements—you must do so manually by creating a new array or by using the
The collection class List<T> (from namespace
System.Collections.Generic) provides a convenient solution to this problem. The
T is a placeholder—when declaring a new
List, replace ...