What is Value type and reference type in .Net



What is Value type and reference type in .Net..

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

More Dot Net Framework Interview Questions

Is dapper better than entity framework?

0 Answers  


Mention what is the difference between “ActionResult” and “ViewResult” ?

0 Answers  


What is html.renderpartial?

0 Answers  


Is razor a server side?

0 Answers  


Where do the reference-type variables go in the RAM ?

1 Answers  






What is meant by domain model?

0 Answers  


If Controller is not there in MVC Pattern what happens?

2 Answers  


mention in what all scenarios entity framework can be applicable?

0 Answers   Microsoft,


Is .net core faster than .net framework?

0 Answers  


If you are using components in your application, how can you handle exceptions raised in a component ?

4 Answers   Accenture, BirlaSoft,


How to enable Attribute Routing?

0 Answers  


How to update one of my table in database at 4pm every day how it is possible?

0 Answers  


Categories