Difference between reference type and value type
Ask by Manish Kumar
Updated 23 Sep 2020
Value type and Reference type-
Value types are stored in the stack where as reference type are stored on heap.
Value type-
Int,enum,byte,decimal,double etc.
Value type holds the data within its own memory allocation.
Reference types-
String,Class,interface ,object etc.
Reference type contains pointer to another memory location that holds the real data.