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

How to identify the Code which Complies corresponding Compiler in .NET? Means Suppose, i am taking One project A.. in which code is implemented using C# langugge. And Another Project B..in Which Code is implemented using VB.NET. Suppose I am creating Project C. i am adding Reference of Project A and B to Project C. So, in Project C, how to identify Project A is Complied through CSCompliler? And Project B is Compiled VBCompiler at Runtime?

1 Answers  


How would you deploy your old applications with .net framework 4.0? Are the old applications compatible?

0 Answers  


What is page life cycle?

0 Answers  


WHICH IS MORE SECURED AMONG JAVA AND .NET?

7 Answers  


what is mean by versioning? Please answer me. Advance thanks.

2 Answers   Excel,






What is the use of display modes?

0 Answers  


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

0 Answers   Microsoft,


How we can invoke child actions in ASP.Net MVC?

0 Answers  


How to Redirect Tracing to a File

0 Answers   HCL,


How do I define my own code group

1 Answers  


How do I use partial view?

0 Answers  


What is mvc entity framework?

0 Answers  


Categories