Generics didn't exist at all in the first version of VB.NET, but they're the starting point for sophisticated features in later versions. This is another concept, like Try-Catch structures, that has been borrowed after proving itself in languages like C++. This article starts at the beginning and explains what generics are all about. The inspiration, and some of the code, for this article came from an excellent MSDN seminar presented by Microsoft .NET evangelist, Anand Iyer.)
Microsoft defines generics this way:
"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 might want to perform that functionality."
So, generics are an extension to the CLR (Common Language Runtime) type system. In true OOP fashion, they help you write classes (or, use classes that have already been written) for more purposes and avoid having to write essentially the same code with just the datatype changed when the rest of the processing is the same.
But none of this really makes a lot of sense until you see it in action. On the next page, we write the code for generics.
