O'Reilly logo

Professional .NET 2.0 Generics by Tod Golding

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

14.2. The Big Picture

Before getting into the details of the Power Collections, it will be helpful to step back and take a more conceptual view of the framework. Understanding this broader view will make it easier for you to determine the general roles that are played by each class in the library. This perspective should also provide you with a better idea for where and how you might want to introduce your own classes that extend the library.

The Power Collections library breaks down, logically, into base classes, containers, algorithms, delegates, and data structures. The sections that follow examine each of the constructs and explains, in more detail, the role each of these classes might play in your solutions.

In many respects, the classes that appear in the Power Collections library have their roots in classes that have been the staples of existing generic libraries. Specifically, you'll notice that the library borrows from concepts found in the Standard Template Library (STL) that is very popular among the C++ templates crowd. Naturally, with the constraints model employed by the .NET generics implementation, the library cannot offer a one-for-one mapping of the STL classes.

14.2.1. Base Classes

The Power Collections library introduces new types of data containers that offer alternative approaches to organizing and accessing data. The BCL's Collection<T> class, for example, implements an indexed collection that may be adequate as a base class. However, its implementation ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required