Chapter 14. Generics and Nullable Types
In This Chapter
When you organize your home, you probably place things according to their type. For example, you have a place for food that is different from the place where you put clothes. But foods are also different. You do not treat fish like candy or pizza and so on. So you need safe places for each kind of food, avoiding the risks derived from treating all foods the same way; the same is true for clothes and any other item in your home. 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 ...