July 2015
Intermediate to advanced
1300 pages
87h 27m
English
You can define the following types as generics: classes, interfaces, delegates, structures, and methods. Creating a generic type is accomplished by providing a parameterized type definition. The following is an example:
Class CustomType(Of T)End Class
The Of keyword is followed by the type that the new object can handle. T is the type parameter and represents the .NET type you want to be held by your generic type. The type parameter’s name is left to your own choosing, but T is often used as a common name in the .NET Framework Base Class Library (BCL). At this point, you must write code to manipulate the T type in a way that will be convenient for possibly every .NET type. Now imagine you want to build a custom ...