Generic Collections

Data collections such as the ArrayList and Hashtable do not enforce type safety when working with their contents. This requires implicit boxing and extra handling that slow down the code, as well as allowing runtime errors if an unexpected data type is encountered in the list.

With Generics, collections such as List<> and Dictionary<> are strongly typed, so that only certain types of data can be used in the list. This eliminates the need for boxing, thereby speeding up code. It also increases reliability of the application as most problems related to invalid data types in the list will now be caught by the compiler instead of waiting for the program to run.