O'Reilly logo

C# 5.0 Unleashed by Bart De Smet

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required