It is important to understand that C# distinguishes between two categories of data type — value and reference types. The main difference is that a value type stores value directly and reference type stores a reference to its value. Value types are stored in the stack, and reference types are stored in the managed heap.
Also, assignment operation have different behavior on value types and reference types. Consider the following examples:
If a variable is a reference, it is possible to set a null reference, one that does not refer to any object. If a reference is set to null, then it is possible call only static members functions or fields against it. Also, if you try to call any nonstatic member functions or fields, you’ll get an exception at runtime.
Most of the complex C# data types, including classes that you declare, are reference types. They are allocated upon the managed heap. If you want to define own complex value type, you should declare it as a struct.