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

Is .net framework 4.8 the last version?

753


How to Create an Intranet Site Using ASP.NET MVC?

811


Explain entity lifecycle? : Entity framework

785


What are actions in mvc?

752


The order of the filters that get executed, if the multiple filters are implemented?

812


What is Layout in ASP.Net MVC?

792


What are Non Action methods in ASP.Net MVC?

798


Define the core components of an ASP.NET MVC application?

789


What is the use of action filters in an mvc application?

845


Asp.net mvc application, makes use of settings at 2 places for routing to work correctly. What are these 2 places?

858


What are Scaffold templates in ASP.Net MVC?

769


Is it possible to create a custom filter?

761


What are the new enhancements done in default project template of asp.net mvc 4?

789


Explain what is routing?

728


What is partialview in asp.net mvc?

795