Chapter 8. BCL Generics

The potential and power of generics is most fully realized in the implementation of container frameworks. Given this reality, it only made sense that the introduction of generics would also be accompanied by the introduction of a pool of new generic types. In version 2.0 of the .NET Framework, the Base Class Library (BCL) introduces two new namespaces, System.Collections.Generics and System.Collections.ObjectModel, both of which include generic representations of many of the non-generic containers that already existed in the System.Collections namespace long before generics came along. The goal of this chapter is to provide you with an overview of the classes that appear in these namespaces, along with a roadmap for how and when you might want to apply each of these generic types. It also covers all the key methods and properties that are associated with each of these new types.

Get Professional .NET 2.0 Generics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.