---
title: "differences between value type and reference type."  
description: "differences between value type and reference type."  
author: "Tarun Gautam"  
published: 2017-11-15  
canonical: https://answers.mindstick.com/qa/30633/differences-between-value-type-and-reference-type  
category: "programming"  
tags: [".net programming", "java programming", "c programming"]  
reading_time: 1 minute  

---

# differences between value type and reference type.

[differences](https://www.mindstick.com/blog/300750/what-is-the-link-between-resting-metabolic-rate-and-basal-metabolic-rate) between [value](https://www.mindstick.com/articles/23219/an-optimized-description-adds-value-to-experience-and-in-turn-effectively-guest-posting-packages) type and [reference type](https://www.mindstick.com/interview/1820/what-are-value-types-and-reference-types).

## Answers

### Answer by Arti Mishra

**"Difference between value type and [reference](https://www.mindstick.com/forum/774/reference-what-does-this-error-mean-in-php) type "**

- **Value Type:** Value Types derive from **System.ValueType**, which is derived from **System.Object.** In other words, you can say that a data type is a value type that holds data value within its own memory space. For example, consider the following integer variable int a=80; The system stores 10 in the memory allocated for the variable 'a'. ![differences between value type and reference type.](https://answers.mindstick.com/questionanswer/294e6112-93e0-4d8a-b170-6ee50a610cc6/images/ba414d37-4365-42df-a4be-589cd623f65a.png)\ \ The following data types are all of the value types: **Reference Type:** ReferenceType doesn’t store the value directly. It **Stores the address** where the value is stored. In other words, you can say that reference type **contains a pointer** to another memory location that **points the address of any variable.** ![differences between value type and reference type.](https://answers.mindstick.com/questionanswer/294e6112-93e0-4d8a-b170-6ee50a610cc6/images/2fcafa20-db76-45e2-9ab3-924b1cb028db.png) \ \

   - bool
   - byte
   - char
   - decimal
   - double
   - enum
   - float
   - int
   - long
   - sbyte
   - short
   - struct
   - uint
   - ulong
   - ushort


---

Original Source: https://answers.mindstick.com/qa/30633/differences-between-value-type-and-reference-type

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
