The C# Programming Language, Third Edition
by Anders Hejlsberg, Mads Torgersen, Scott Wiltamuth, Peter Golde
4. Types
The types of the C# language are classified into two main categories: value types and reference types. Both value types and reference types may be generic types, which take one or more type parameters. Type parameters themselves can designate both value types and reference types.
type: value-type reference-type type-parameter
A third category of types, pointers, is available only in unsafe code. Pointers are discussed further in §18.2.
Value types differ from reference types in that variables of the value types directly contain their data, whereas variables of the reference types store references to their data, the latter being known as objects. With reference types, it is possible for two variables ...
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