Introduction


A long-awaited feature, generics, is finally here with the advent of Version 2.0 of the C# compiler. Generics is an extremely useful feature that allows you to write less, but more efficient, code. This aspect of generics is detailed more in Recipe 4.1. With generics comes quite a bit of programming power, but with that power comes the responsibility to use it correctly. If you are considering converting your ArrayList, Queue, Stack, and Hashtable objects to use their generic counterparts, consider reading Recipes 4.4, 4.5, and 4.10. As you will read, the conversion is not always simple and easy, and there are reasons why you might not want to do this conversion at all.

Other recipes in this chapter deal with other generic classes contained in the .NET Version 2.0 Framework, such as Recipe 4.6. Still others deal with the operation of any generic type, such as Recipes 4.2, 4.8, and 4.13.



C# Cookbook
Secure Programming Cookbook for C and C++: Recipes for Cryptography, Authentication, Input Validation & More
ISBN: 0596003943
EAN: 2147483647
Year: 2004
Pages: 424

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