Summary


In this chapter, you:

  • Examined how to use generic types in C#.

  • Looked at how to use structs, including how to create nullable types, and how to use the classes in the System.Collecitons.Generic namespace.

  • Saw how to create your own generic types, including classes, interfaces, methods, and delegates.

Generics, as you saw, are an extremely powerful new technique in C#. You can use them to create classes that fill a number of purposes at the same time and are able to be used in a variety of situations. And even if you don't have cause to create your own generic types, you're almost guaranteed to use the generic collection classes time and again.

In the next chapter, I'll finish the discussion of the basic C# language by tying up a few loose ends and looking at events.




Beginning Visual C# 2005
Beginning Visual C#supAND#174;/sup 2005
ISBN: B000N7ETVG
EAN: N/A
Year: 2005
Pages: 278

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