20.1. Introduction

In Chapter 19, we presented data structures that stored and manipulated object references. This chapter continues our multi-chapter discussion on data structures. You could store any object in our data structures. One inconvenient aspect of storing object references occurs when retrieving them from a collection. An app normally needs to process specific types of objects. As a result, the object references obtained from a collection typically need to be downcast to an appropriate type to allow the app to process the objects correctly. In addition, data of value types (e.g., int and double) must be boxed to be manipulated with object references, which increases the overhead of processing such data. Most importantly, processing ...

Get Visual C#® 2012: How to Program, Fifth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.