Generic Classes in C# 2.0

Code once. Use many. That’s what generics are about. Called templates in C++, C# generics support separating code by algorithm and data structure. For example, the generic list means that you’ll never again have to write a strongly typed collection. Paul Kimmel shows just how easy it is to define and use generics, long considered one of the most advanced and difficult idioms. This article is adapted from Paul Kimmel’s book C# Express.

One Response

  1. 2005-11-14 3:47 pm