Classes and Other Types

So far, we’ve not made the distinction between a class and a type concrete. The CLR supports multiple sorts of types (not to say “types of types”), but one big top-level distinction can be made, as follows:

Image Variables of a value type immediately contain the data. When assigned to another variable (for example, also when passing to a method parameter), the contents are copied by value. So, value types are passed by value (by default).

Image Variables of a reference type store a reference to the data. This means multiple variables ...

Get C# 5.0 Unleashed now with O’Reilly online learning.

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