Chapter 14. Generics and Nullable Types

When you organize your home things, you probably place things according to their kind. For example, you have a place for food that is different from the place where you put clothes. But also foods are different. You will not treat fish like meat or pizza and so on. So you need safe places for each kind of food, avoiding the risks deriving from considering all foods the same way; the same is for clothes and any other home item. The .NET development would be similar without Generics. Consider groups of .NET objects of different types, all grouped into a collection of Object. How can you be sure to treat ...

Get Visual Basic® 2010 Unleashed 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.