A variable of this type represents a piece of data itself.
Memory is allocated on the stack.
// Structure , Enumerations and primitive datatypes.
int i = 8;
int i1 = i;
i = 9;
Here, changing one will not have impact on another; the
memory here is created twice.
A variable of this category points to the location of data
rather than data itself. Memory is created on the heap. Arrays, Classes, Delegates
and Interface are examples.
This type is similar to pointers.
Class1 objClass1 = new Class2();
objClass1.Name = "S";
Class1 objClass1Intance = objClass1;
objClass1Intance = "SU";
Here, both instances refer to the same object, changes to
one applies to both.