A generic type is a single programming element that adapts to perform the same functionality for a variety of data types. When you define a generic class or procedure, you do not have to define a separate version for each data type for which you may want
to perform that functionality.
Generic types were introduced in version 2.0 of the .NET Framework, and make it possible to design classes, structures, interfaces, and methods that defer the specification of one or more types until client code declares and instantiates the class or method. For example, by using a generic type parameter, you can write a single class that other client code can use without the cost or risk of CLR casts or boxing operations.
A type definition that takes type parameters is called a generic type. You can define and use generic classes, structures, interfaces, methods, and delegates
Generic types are designated by the syntax ClassName
(C#) or ClassName(Of T) (Visual Basic), where T represents a data type that the client code must specify when it uses the generic class.
Generic types have the following advantages over nongeneric types:
1- Type safety. Generic types enforce compile-time type checking. Types that are based on System.Object accept any data type, and you must write code to check whether an input data type is acceptable. With generic types, the compiler can catch type
mismatches before run time
2- Performance. Generic types do not have to box and unbox data because each one is specialized for one data type. Operations that are based on System.Object must box input data types to convert them to System.Object and unbox data that is destined for output
3- Generic algorithms. Abstract algorithms that are type-independent are good candidates for generic types. For example, a generic procedure that sorts items by using the IComparable interface can be used with any data type that implements IComparable
Hope this helps.