Here are our two golden rules:
- A Reference Type always goes on the Heap; easy enough, right?
- Value type always goes on the Stack.
In C#, all the “things” declared with the following list of type declarations are Value types (because they are from System.ValueType):
All the “things” declared with the types in this list are Reference types (and inherit from System.Object, except, of course, for object which is the System.Object object):