- What Are Generics?
- Generics in C#
- Generic Classes
- Declaring a Generic Class
- Creating a Constructed Type
- Creating Variables and Instances
- Constraints on Type Parameters
- Generic Methods
- Extension Methods with Generic Classes
- Generic Structs
- Generic Delegates
- Generic Interfaces
With the language constructs you’ve learned so far, you can build powerful objects of many different types. You do this mostly by declaring classes that encapsulate the behavior you want and then creating instances of those classes.
All the types used in the class declarations so far have been specific types—either programmer-defined or supplied by the language or the BCL. There are times, however, ...