O'Reilly logo

A Programmer's Guide to .NET by Alexei Fedorov

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

3.7. Reference types

Reference types got their name because they contain references to the objects allocated on the heap. Such types can contain null references and are always passed by reference. This means that an address of the object, not the object itself, is passed to a procedure or function, meaning that changes will be made to the object, not its copy, as we have seen in the previous example for structures. The main reference type is a class – we will learn about this type in the next section.

Classes

By definition, a “class” is a data structure that may contain data members (constants, variables, and events), function members (methods, properties, indexers, operators, and constructors), and nested types. One important note about classes ...

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