What is difference between Value type and Reference type?

  1. Value types hold data directly where as a reference type doesn't have data.
  2. Null's can't be stored in value type data where as Null's can be stored in reference type.
  3. Value type data will be creating at compile time in stack memory where as reference type will be creating at run time in heap memory.
  4. Predefined data types like int, float are examples for value type data types. Classes, interfaces, delegates and arrays are examples for reference type data types.

0 comments :

Post a Comment

> Related Posts with Thumbnails
 

Copyright © 2012. GS dot net - All Rights Reserved - Design by BTDesigner - Proudly powered by Blogger