- Shopping Bag ( 0 items )
Ships from: Phoenix, MD
Usually ships in 1-2 business days
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++.
Chapter 1: Generics 101.
Chapter 2: Valuing Type Safety.
Chapter 3: Generics ≠ Templates.
Chapter 4: Generic Classes.
Chapter 5: Generic Methods.
Chapter 6: Generic Delegates.
Chapter 7: Generic Constraints.
Chapter 8: BCL Generics.
Chapter 9: Reflection, Serialization, and Remoting.
Chapter 10: Generics Guidelines.
Chapter 11: Under the Hood.
Chapter 12: Using Generics with C++.
Chapter 13: Using Generics with J#.
Chapter 14: Power Collections.
Posted November 20, 2005
Until reading this book, I had been nervous about the introduction of generics into .Net. First, I wasn¿t sure how well they would be implemented equivalently across multiple languages. Second, I had been an early C++ programmer and lived through how complicated the introduction of templates made that language. This book has convinced me that generics will work equally well in C++, C#, and even Visual Basic. As a long-time C++ programmer, my favorite chapter was Chapter 3, which presented very cogent arguments as to why generics are not the same as templates. Another favorite is Chapter 10, which presents 23 very specific guidelines for all generics programmers to be mindful of. The book benefits greatly from always showing each example in both VB and then in C#. I¿m sure you could pick up a more general ¿Programming in .Net¿ book and read its one chapter on generics. However, since generics are probably the most significant addition to .Net, you will miss out on learning many of the powerful new ways to take advantage of generics that Golding presents in this book.Was this review helpful? Yes NoThank you for your feedback. Report this reviewThank you, this review has been flagged.
Posted November 14, 2005
Generics is [sic] one of the most compelling ideas in any object oriented language. The puzzle is that it was not present in the first versions of .NET and Java. It is only now (2004-5) that both languages comes with this. A little strange, considering that C++ has had templates for several years, and these are roughly equivalent to the implementations of Generics in .NET and Java. Anyhow, Golding focuses on explaining the use of Generics within .NET. The latter encompasses several Microsoft languages that now have this facility - VB, C# and J#. The book makes a practice of giving code examples in pairs written in VB and C#. To broaden its appeal to practitioners in both. He shows how Generics can be succinctly thought of as parametric polymorphism. It takes the elementary idea of polymorphism that every object oriented language has, and extends it to parameterising the input types to a class's methods or constructors. The book gives a pretty thorough rundown on Generics. Including explaining the differences with C++ templates. The biggest being crucially that .NET Generics are instantiated at runtime, while the latter are at compile time. [Golding devotes an entire chapter to the consequences of this.] You can get an appreciation for the extra type safety and generalisations possible in your code.Was this review helpful? Yes NoThank you for your feedback. Report this reviewThank you, this review has been flagged.