Showing posts with label Reference types. Show all posts
Showing posts with label Reference types. Show all posts

Tuesday, 1 November 2011

What are Value types and Reference types ?

Value types directly contain their data which are either allocated on the stack or allocated in-line in a structure.

Reference types store a reference to the value's memory address, and are allocated on the heap. Reference types can be self-describing types, pointer types, or interface types.

Variables that are value types each have their own copy of the data,