Appendix A. Generics

A. Problem Background

  1. The largest omission in the 1.1 Framework's object services is the inability to parameterize object types, as the template mechanism of C++ or Java allows. That might not mean much at first glance, especially to nonprogrammers, but here's what I mean and why it's important. Suppose I have an array, an object of class System.Array. That array is defined as holding objects of the universal base class System.Object, which means that it can hold any .NET object in existence. This capability is handy because we don't have to develop a special array to hold each class of object that we have to deal with. But it's rare that we use any particular array to hold objects of more than one class. Even though any element ...

Get Programming Microsoft® Composite UI Application Block and Smart Client Software Factory 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.