Summary
This chapter introduced a very important new
feature of .NET 2.0: generics. With generic classes you can create
type-independent classes, and generic methods allow
type-independent methods. Interfaces, structs, and delegates can be
created in a generic way as well. Generics make new programming
styles possible. You’ve seen how algorithms, particularly actions
and predicates, can be implemented to be used with different
classes - and all type-safe. Generic delegates make it possible to
decouple algorithms from collections.
Other .NET Framework types include are Nullable<T>, EventHandler<TEventArgs>, and ArraySegment<T>.