The contents of the book fall into some logical categories. The book starts out with a series of chapters
that are focused primarily on the conceptual aspects of generics. Although these chapters use .NET
generics to convey these concepts, they're really more broadly applicable to anyone who might be inter-
ested in understanding the overall value of using generics.
Beyond the conceptual, the book then moves on to a series of chapters that are dedicated to exploring
the specific syntactic mechanics of using .NET generics. These chapters look at all the ways generics are
applied to classes, methods, delegates, and so on and explore all the rules that govern their declaration
Once coverage of the mechanics are completed, the book then turns its attention to those libraries that
will provide you with some of the fundamental, out-of-the-box types that typically come with any envi-
ronment that supports generics. The book addresses this with two chapters that explore the BCL generic
types that are included with the .NET Framework and a third-party library that provides even more
standard generic types that you're likely to find yourself leveraging in your own code.
To round things out, the book also examines some of the broader generic issues, including generic guide-
lines, a comparison with C++ templates, and a peek under the hood of the .NET generics implementation.
Who Is This Book For?
This book is targeted at a fairly wide spectrum of developers. Certainly, its broadest appeal will be those
developers who are first-time generic programmers. That population of developers will extract the most
benefit from the full range of topics I'm targeting here, spanning everything from the basic introduction
to syntax and concepts to the libraries and discussion of the underlying mechanics of generics.
The next tier of likely readers are those developers who might be transitioning from C++ templates or
even Java generics. If you fall into this category, you might find yourself more interested in diving
directly into the syntax and reference materials.
Overall, this book should be of value to anyone who wants a more comprehensive understanding of the
features and characteristics of the .NET implementation of generics. Even if you're not a .NET developer,
you may find generic topics here that are of value to you.
While this book is targeted at a fairly broad audience, it is not likely to be appropriate for anyone that is
relatively new to the field of computer science. Generics will simply be too difficult to tackle if you don't
have a firm handle on basic object-oriented programming concepts and techniques.
As a CLS-compliant feature, generics are supported under C#, Visual Basic, C++, and J#. And, as is the
case for many .NET authors, there is always the issue of how to address a technology that spans all these
languages without diving deeply into the syntactic nuances of each one. This is especially true with
something like generics, where the generic syntax between, say, VB and C#, varies quite a bit.
These realities, coupled with my strong belief that you need to see examples in your language of prefer-
ence, led me down the path of showing examples in both Visual Basic and C#. My logic was based on
03_559885 flast.qxd 9/8/05 11:03 PM Page xvii