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

Explain states of a thread in c#?

744


What is difference between list and dictionary in c#?

658


What is iqueryable and ienumerable in c#?

714


What is difference between singleordefault and firstordefault?

690


what is the default access for a class

781


How many types of polymorphism are there?

714


What is meant by console programming?

667


Does c# support templates?

754


Is python easier than c#?

715


What is the use of readkey in c#?

722


What is the difference between method overriding and method overloading?

663


What is session c#?

692


What is property c#?

708


Why do we need to serialize data?

669


Why do you need boxing in c#?

665