what are value types and reference types? where they are stored?

Answer Posted / chiyan

value types holds the data directly ,no default value for
value type ex-->predefined datatypes
-->structures
-->enumarator
valuetypes will be stored in stack memory.

refe types does not holds the value directly,ref type holds
the default value ex-->arrays
-->classes
-->objects

ref types will be stored in heap memory.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sorting in c#?

521


What are access modifiers in c#?

552


Is cli same as the clr?

520


Is javascript harder than c#?

514


Can you declare a class or a struct as constant?

548






The int maps to which C# keyword in .NET type?

662


What is serialization in .net?

566


What is the base class from which all value types are derived?

501


What are the access modifiers in c#?

499


What is a class in unity?

484


What is variable in c#?

514


What is selector c#?

509


Explain the constructor in c#.

573


If you want to write your own dot net language, what steps you will u take care?

559


What does question mark mean in c#?

569