What is Reference type and value type

Answer Posted / kirti

Reference Type:

Reference types are allocated on the managed CLR heap, just like object types.

A data type that is stored as a reference to the value's location. The value of a reference type is the location of the sequence of bits

that represent the type's data. Reference types can be self-describing types, pointer types, or interface types

Value Type:

Value types are allocated on the stack just like primitive types in VBScript, VB6 and C/C++. Value types are not instantiated using new go out of scope when the function they are defined within returns.

Value types in the CLR are defined as types that derive from system.valueType.

A data type that fully describes a value by specifying the sequence of bits that constitutes the value's representation. Type information for a value type instance is not stored with the instance at run time, but it is available in metadata. Value type instances can be treated as objects using boxing.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to use multiple submit buttons in asp.net mvc?

571


Is it possible to unit test an mvc application without running the controllers in an asp.net process?

614


what is client wins and store wins mode in entity framework concurrency?

637


what is explicit loading?

628


What is the use .Glimpse in ASP.Net MVC

565






What are bundling & minification features in asp.net mvc 4?

527


will there be any issues adding a table without primary keys to a data model?

599


What are ajax helpers in mvc?

507


What is controllercontext?

532


What are Validation Annotations?

567


how to disable the lazy loading framework?

587


What is mapping in entity framework? : Entity framework

512


What is the benefit of entity framework?

524


How we can handle the exception at controller level in ASP.Net MVC?

559


Mention two instances where routing is not implemented or required?

739