---
title: "Difference between value type and refernce type."  
description: "In this blog I will tell you some common differences between value types and reference types.1)Value types are those type of data type which will stor"  
author: "Anonymous User"  
published: 2011-06-13  
updated: 2014-09-18  
canonical: https://www.mindstick.com/blog/190/difference-between-value-type-and-refernce-type  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Difference between value type and refernce type.

In this blog I will tell you some common [differences](https://www.mindstick.com/articles/12918/cat-5e-vs-cat-6a-understanding-the-major-differences) between [value types and reference](https://answers.mindstick.com/qa/92487/what-are-value-types-and-reference-types) types.

1) Value types are those type of data type which will store [value and reference](https://www.mindstick.com/forum/34600/pass-by-value-and-reference) type are those type of data type which will store addresses of [variable](https://www.mindstick.com/articles/1807/objective-c-data-types-variables-object-creation) rather than value.

\
2) Value types are stored in stack part of memory while reference types are stored in heap part of memory.

\
3) The [default value](https://www.mindstick.com/forum/2035/default-value-when-using-singleordefault) which is initialized in value types are 0, false, ‘\0’ etc while in reference types the default value are initialize is null.

\
4) When we assign the value of one value type variable to another type of variable then it simply copy value of variable and when we use [assignment](https://www.mindstick.com/articles/126300/apa-citation-style-get-to-know-about-it-for-your-next-assignment) operator in case of reference variable then it copy address of variable rather than value.

\

##### 5) Following example represent value type variable.

int i=17; int j=I;

Following example will represents use of reference variable.

String sMessage=”[Hello World](https://www.mindstick.com/forum/12912/how-to-show-hello-world-backbone-marionette-js)”;

String sMessage1=sMessage;

---

Original Source: https://www.mindstick.com/blog/190/difference-between-value-type-and-refernce-type

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
