This is a mirror of official site: http://jasper-net.blogspot.com/

6 important .NET concepts: - Stack, heap, Value types, reference types, boxing and Unboxing.

| Tuesday, February 14, 2012

2.jpg

Introduction
What goes inside when you declare a variable?
Stack and Heap
Value types and reference types
So which data types are ref type and value type?
Boxing and Unboxing
Performance implication of Boxing and unboxing
Source code


What goes inside when you declare a variable?

When you declare a variable in a .Net application, it allocates some chunk of memory in to the RAM. This memory has 3 things first the name of the variable, second data type of the variable and finally the value of the variable.

That was a simple explanation of what happens in the memory, but depending on what kind of data type your variable is allocated on that type of memory. There are two types of memory allocation stack memory and heap memory. In the coming sections we will try to understand these two types of memory in more details.

Read more: Codeproject
QR: 6-important-NET-concepts-Stack-heap-Value-types-re

Posted via email from Jasper-net

0 comments: