Difference between reference type and value type Manish Kumar108308-Mar-2017c#c# Updated on 23-Sep-2020
Manish Kumar
08-Mar-2017Value 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.