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 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.