My new C# Generics course on Pluralsight includes topics for everyone.
For beginners:
- Why generic types are useful.
- A demonstration of all the concrete collection types in System.Collections.Generic
- How to build basic generic types (generic classes, generic interfaces, and generic delegates).
For intermediates:
- How to apply generic constraints (including what you can and can’t do with constraints).
- How to cleanup generic code (remove those ugly type parameters from business logic).
- How to use built-in generic delegates like Func, Action, Predicate, Converter, and EventHandler.
On the advanced side:
- How to refactor covariant and contravariant interfaces out of an invariant generic IRepository interface that works against the Entity Framework.
- How to use reflection to discover generic parameters and generic type definitions, as well as build generic types and invoke generic methods in late bound fashion.
- How to build an IoC container with a fluent-ish API that supports nested dependencies and unbound generics.