Appendix D. Generics


Generics[*] are some of the most powerful and useful features of .NET 2.0. Generics allow you to define a type-safe data structure or a utility helper class, without committing to the actual data types used. This results in a significant performance boost and higher-quality code, because you get to reuse data-processing algorithms without duplicating type-specific code. In concept, generics are similar to C++ templates, but they are drastically different in their implementation and capabilities. This appendix discusses the problems that generics address, how they are implemented and applied, and the benefits of the programming model.

[*] This appendix contains excerpts from the white paper "An Introduction to C# Generics," by Juval Lowy, MSDN Magazine, November 2003, updated January 2005.



Programming. NET Components
Programming .NET Components, 2nd Edition
ISBN: 0596102070
EAN: 2147483647
Year: 2003
Pages: 145
Authors: Juval Lowy

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