What is Reference type and value type



What is Reference type and value type..

Answer / 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

More Dot Net Framework Interview Questions

What is the advantage of mvc?

0 Answers  


Why doesn't the .NET runtime offer deterministic destruction

1 Answers  


Why is XmlSerializer so slow

1 Answers  


What is the use of trace utility ?

2 Answers  


What is different between User Control and Web Control and Custom Control?

2 Answers  






what are the aggregate functions in ASP.NET?

1 Answers   CTS, IBM, Zylog,


What are Satellite Assemblies? How you will create this?

4 Answers  


What is mapping in entity framework? : Entity framework

0 Answers  


How to change the action name in ASP.Net MVC?

0 Answers  


What is Dependency Injection in ASP.Net MVC

0 Answers   B-Ways TecnoSoft,


what is namespace?

9 Answers   TCS,


mention in what all scenarios entity framework can be applicable?

0 Answers   Microsoft,


Categories