May 2010
Intermediate to advanced
1272 pages
61h 18m
English
You can overload generic definitions providing different signatures for the type parameter, similar to what happens in methods overloads. The following code provides an example:

It is worth mentioning that providing a nongeneric version of your class is not necessary. In this way you can provide different implementations for your generic types. Now consider the following overloading attempt:

This code is not compiled because although in the second definition some constraints are defined, the type implementation is considered ...
Read now
Unlock full access