What Does Generics Mean?
Generics refer to a feature in C# that allows defining a class or method with type as a parameter. Generics allow for designing a classes and methods whose types are specified only at the time of declaration and instantiation. This enables development of universal classes and methods that help in improving performance, productivity and type-safety.Generics are often used in creating collection classes for implementing concepts such as lists, hash tables, queues, etc. These classes manage a set of objects and encapsulate operations that are not specific to a particular data type. Generics are also known as parametric polymorphism.
Techopedia Explains Generics
Generics were introduced in C# 2.0 as a part of Common Language Runtime of .NET to overcome the limitation in implementing generalization in earlier versions. Generalization was accomplished by casting types to and from universal base type, System.Object that was not type-safe and required casting, which results in a hit to performance. Some of the benefits in using generics include: