Using Collections in .NET
Collections are a vital element of any object-oriented architecture. Offering the capability to group objects in logical constructs, they improve code readability and self documentation, as well as enhance maintainability. In this article, and others in the series, we will cover topics related to collections, from basic implementation and performance analysis to extending collections with polymorphism and inheritance.
Object-Oriented Primer
Most often, object-oriented constructs are described in the type of relationship that they implement. A classic example of describing object-oriented constructs in terms of their real-world implementation counterparts is inheritance. Inheritance implements the "IS A" relationship. As an example, there is Vehicle class that has certain properties of a vehicle, such as Make, Model, NumberOfDoors or HorsePower. There is then a class that derives from Vehicle called SportUtility. The SportUtility class inherits all the properties of the Vehicle class from which it derives and also adds its own properties, such as GroundClearance. It is then said that the SportUtility vehicle "IS A" Vehicle. This relationship is graphically illustrated in Figure 1.
(http://developers-heaven.com/forum/picts/1.gif)
Figure 1 - Inheritance sample showing the SportUtility class deriving from the Vehicle class