---
title: "Difference between reference type and value type"  
description: "Difference between reference type and value type"  
author: "Manish Kumar"  
published: 2017-03-08  
updated: 2020-09-23  
canonical: https://www.mindstick.com/interview/23229/difference-between-reference-type-and-value-type  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Difference between reference type and value type

**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.

## Answers

### Answer by Manish Kumar

**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.


---

Original Source: https://www.mindstick.com/interview/23229/difference-between-reference-type-and-value-type

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
