Statistics
The Highest Post







Statistics
Count 94
Avg 21.00
Min 21
Max 21
Angualr Top questions

Details



Peter Agyekum What are the differences between value types and reference types? 1. Value types are stored on the stack where as reference types are stored on the managed heap. 2. Value type variables directly contain their values where as reference variables holds only a reference to the location of the object that is created on the managed heap. 3. There is no heap allocation or garbage collection overhead for value-type variables. As reference types are stored on the managed heap, they have the over head of object allocation and garbage collection. 4. Value Types cannot inherit from another class or struct. Value types can only inherit from interfaces. Reference types can inherit from another class or interface.
Related Topics