C# Subclassing Generic Types
In this chapter you will learn:
Description
A generic class can be subclassed just like a nongeneric class.
Example
The subclass can leave the base class's type parameters open, as in the following example:
class Stack<T> {...}
class SpecialStack<T> : Stack<T> {...}
Or the subclass can close the generic type parameters with a concrete type:
class IntStack : Stack<int> {...}
A subtype can also introduce fresh type arguments:
class List<T> {...}
class KeyedList<T,TKey> : List<T> {...}
Next chapter...
What you will learn in the next chapter: