Book description
The power and elegance of generic types have long been acknowledged. Generics allow developers to parameterize data types much like you would parameterize a method. This brings a new dimension of reusability to your types without compromising expressiveness, type-safety, or efficiency. Now .NET generics makes this power available to all .NET developers. By introducing generic concepts directly into the Common Language Runtime (CLR), Microsoft has also created the first language-independent generics implementation. The result is a solution that allows generic types to be leveraged by all the languages of the .NET platform.
This book explores all aspects of the .NET generics implementation, covering everything from fundamental generic concepts, to the elements of generic syntax, to a broader view of how and when you might apply generics. It digs into the details associated with creating and consuming your own generic classes, structures, methods, delegates, and interfaces, examining all the nuances associated with leveraging each of these language constructs. The book also looks at guidelines for working with generic types, the performance gains achieved with generics, the new generic container libraries (BCL and third party), and key aspects of the underlying .NET implementation.
For those transitioning from C++, the book provides an in-depth look at the similarities and differences between templates and.NET generics. It also explores the syntactic variations associated with using generics with each of the .NET languages, including C#, Visual Basic, J#, and C++.
Table of contents
- Copyright
- About the Author
- Credits
- Acknowledgments
- Introduction
- Generics 101
- Valuing Type Safety
- Generics ≠ Templates
- Generic Classes
- Generic Methods
- Generic Delegates
- Generic Constraints
- BCL Generics
- Reflection, Serialization, and Remoting
- Generics Guidelines
- Under the Hood
- Using Generics with C++
- Using Generics with J#
- Power Collections
- Index
Product information
- Title: Professional .NET 2.0 Generics
- Author(s):
- Release date: October 2005
- Publisher(s): Wrox
- ISBN: 9780764559884
You might also like
book
Professional C# 4 and .NET 4
This book starts by reviewing the overall architecture of .NET in order to give you the …
book
.NET Common Language Runtime Unleashed
The .NET Framework provides a runtime environment called the Common Language Runtime, which manages the execution …
book
Professional C# 5.0 and .NET 4.5.1
Comprehensive, advanced coverage of C# 5.0 and .NET 4.5.1 Whether you're a C# guru or transitioning …
book
Professional ASP.NET 2.0 Special Edition
ASP.NET allows web sites to display unique pages for each visitor rather than show the same …