Generics allow you to delay the specification of the data type of programming elements in a class or a method, until it is actually used in the program. In other words, generics allow you to write a class or method that can work with any data type.
Using generics is a technique that enriches your programs in the following ways:
The .NET Framework class library contains several new generic collection classes in the System.Collections.Generic namespace.
You may use these generic collection classes instead of the collection classes in the System.Collections namespace.
Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!