Please enable Javascript to correctly display the contents on Dot Net Tricks!
C# Questions & Answers

What is value type and reference type?

Value Type

A value type variable store actual values. Also, value types are stored in a stack. Values types are of two types - built-in and user-defined. Value types are derived from System.ValueType.

Reference Type

A reference type variable stores a reference to the actual value. It means reference type contains a pointer to another memory location that holds the actual data. Also, reference types are stored in a heap. Reference types are of two types - built-in and user-defined. Reference types are derived from System.Object.