Skip navigation

Professional .NET 2.0 Generics

PRObooks

 

Professional .NET 2.0 Generics

Tod Golding s Professional .NET 2.0 Generics is a book that covers the concepts of generics, the syntax of using .NET generics, and Base Class Library generic types. Golding kicks things off discussing generics at a high level, then proceeds to delve deeper into the topic as the book goes along. The further you get into the topic, the more it is .NET specific.

 

In the beginning of the book Golding provides an example to whet your appetite and help you understand the power of generics. Programmers new to generics will appreciate this section because it s helpful to understand the power of generics. Chapter 3 is more helpful to people who are familiar with C++ templates. This chapter is dedicated to clarifying the differences between generics and templates.

 

The middle of the book provides a great reference if you plan to implement your own generics. Here you can learn the implementation of .NET generics. This includes how to declare your own generic classes, as well as generic methods and delegates. The section on delegates provides a really helpful example. I also found the chapter on constraints helpful, although sometimes I had to read sections more than once to fully get the author s point. If you are already familiar with collection classes, then the section on BCL generics will give you new options on how you can use those collection classes. BCL generics provide a nice way to clean up your code and Golding does a good job describing how to do that.

 

Toward the end of the book, the author touches on serialization and reflection, as well as guidelines for when you should use generics and when you shouldn t. However, the guidelines are meant to be just that guidelines and this section is not meant to be taken as programming law, and Golding states that up front. Definitely read this section before implementation if you are contemplating using generics. Most of the examples in the book are provided in C# and VB.NET, but Golding does go into good detail about implementing generics in C++ and J#. You ll appreciate that if you are C++ programmer, especially when so many other books don t address C++ as much.

 

Those who are new to generics will get the most out of this book. However, even if you ve worked with generics you can still gain from understanding the .NET syntax of using them. The second half of the book addresses how to get the most out of generics and the .NET Framework; more seasoned programmers will benefit from that section.

 

David Mack

 

Rating:

Title: Professional .NET 2.0 Generics

Author: Tod Golding

Publisher: Wiley Publishing

ISBN: 0-7645-5988-5

Web Site: http://www.wrox.com/WileyCDA/WroxTitle/productCd-0764559885.html

Price: US$39.99

Page Count: 367

 

 

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish