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>.




Professional C# 2005 with .NET 3.0
Professional C# 2005 with .NET 3.0
ISBN: 470124725
EAN: N/A
Year: 2007
Pages: 427

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net