■
Source Code
The CustomGenericCollection project is located under the Chapter 10 subdirectory.
Creating Generic Base Classes
Before we examine generic interfaces, it is worth pointing out that generic classes can be the base
class to other classes, and can therefore define any number of virtual or abstract methods. However,
the derived types must abide by a few rules to ensure that the nature of the generic abstraction
flows through. First of all, if a nongeneric class extends a generic class, the derived class must spec-
ify a type parameter:
Do'stlaringiz bilan baham: |