What is Value type and reference type in .Net

Answer Posted / kirti

Value Type : A variable of a value type always contains a value of that type. The assignment to a variable of a value type creates a copy of the assigned value, while the assignment to a variable of a reference type creates a copy of the reference but not of the referenced object.

The value types consist of two main categories:

* Stuct Type

* Enumeration Type

Reference Type :Variables of reference types, referred to as objects, store references to the actual data. This section introduces the following keywords used to declare reference types:

* Class

* Interface

* Delegate

This section also introduces the following built-in reference types:

* object

* string

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How large is the .net framework 3.0?

553


What is the difference between partial and renderpartial?

493


what is model first approach?

600


Is it possible to share a view across multiple controllers?

512


List the new features added in .net framework 4.0.

514






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

571


What is the difference between tempdata and viewbag?

492


What is the difference between model view and controller?

476


what is use of entity container?

599


Mention two instances where routing is not implemented or required?

740


what is explicit loading?

630


Explain the methods used to render the views in mvc?

542


What is routeconfig.cs in mvc 4?

641


Can you explain renderbody and renderpage in asp.net mvc?

543


Can any particular component of .net framework 3.0 be removed?

515