Search

Tuesday, November 5, 2013

Stack and Heap in c#

Well, Before discussing what is Stack and Heap in c#. It would be better if you understand what is value type and 
reference type. In c# values are divided into types:
1. Instance of value type
2. Instance of Reference type
3. References

Instance of value type includes following types(Primitive)
1.float,char,int,double,decimal etc except System.string

Instance Reference type:
1.class,object,string

References:
It is a datatype which contains address of another memory block.So, Value of references is an Address.