Q:

What are Value types and Reference types in C#?

0

What are Value types and Reference types in C#?

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

In C#, data types can be of two types, value types, and reference types. Value type variables contain their object (or data) directly. If we copy one value type variable to another then we are actually making a copy of the object for the second variable. Both of them will independently operate on their values, Value type data types are stored on a stack and reference data types are stored on a heap.

In C#, basic data types include int, char, bool, and long, which are value types. Classes and collections are reference types.

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C# Interview Questions and Answers,You Need To Know

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
What are Jagged Arrays in c#?... >>
<< Why can’t you specify the accessibility modifier...