New Post has been published on Varinder Sandhu 's Blog
New Post has been published on http://www.varindersandhu.in/2011/06/19/dot-net-framework-value-type-vs-reference-type/
Dot Net Framework - Value Type Vs Reference Type
What is difference between Value Type and Reference Type ? or Value Type Vs Reference Type ?
Value Type
<!-- google_ad_client = "pub-2404605494811633"; google_alternate_color = "FFFFFF"; google_ad_width = 468; google_ad_height = 60; google_ad_format = "468x60_as"; google_ad_type = "text_image"; google_ad_channel =""; google_color_border = "FFFFFF"; google_color_link = "0000FF"; google_color_bg = "FFFFFF"; google_color_text = "000000"; google_color_url = "008000"; google_ui_features = "rc:6"; //-->
A data type is a value type if it holds the data within its own memory allocation. All value based types are allocated on the stack. When a value type is assigned to another value type, it is copied.
Reference Type
A reference type contains a pointer to another memory location that holds the data or we can say reference type contains a reference to the value. Reference based types are allocated on the heap. When a reference type is assigned to another reference type, a reference is assigned to the value.
For more detail: http://msdn.microsoft.com/en-us/library/t63sy5hs%28v=vs.80%29.aspx













