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 ...
Get Visual Basic® 2012 Unleashed, Second Edition 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.