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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access