Chapter 2. Types

Types are the places, persons, and things found in an application. Object-oriented programs model real-world problems, in which types represent identities from your problem domain. An employee in a personnel program, a general ledger entry in an accounting package, and geometric shapes in a paint application are examples of types. Types include reference types, value types, and unsafe pointers. Reference types and value types will be discussed in this chapter; unsafe pointers are covered in Chapter 19, "Unsafe Code."

A reference type refers to an object created on the managed heap, and the lifetime of the resulting object is controlled by the Garbage Collector, which is a component of the Common Language Runtime (CLR). The local ...

Get Programming Microsoft® Visual C#® 2008: The Language 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.