O'Reilly logo

C# in Depth by Jon Skeet

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

Chapter 3. Parameterized typing with generics

This chapter covers

  • Generic types and methods

  • Generic collections in .NET 2.0

  • Limitations of generics

  • Comparisons with other languages

True[1] story: the other day my wife and I did our weekly grocery shopping. Just before we left, she asked me if I had the list. I confirmed that indeed I did have the list, and off we went. It was only when we got to the grocery store that our mistake made itself obvious. My wife had been asking about the shopping list whereas I’d actually brought the list of neat features in C# 2. When we asked an assistant whether we could buy any anonymous methods, we received a very strange look.

If only we could have expressed ourselves more clearly! If only she’d had some way of saying ...

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