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

Answer Posted / pankaj

value types------int,float,char
reference type----Array,class

value types stored in stack while reference type stored in heap.
in reference type address f variables are stored

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why can’t struct be used instead of class for storing entity?

568


Explain about accessibility modifier 'protected internal'?

611


Can struct be static in c#?

612


What is extension method in c sharp?

558


Define Abstract Class in C#

620






how to prevent a class from being inherited in c#.net?

590


What is Implementation inheritance

601


What is a console?

588


Why do we use namespace in c#?

604


What does console readkey do in c#?

584


Which is more efficient for loop or while loop?

534


What is difference between method and function in c#?

545


What is cts, clr?

513


What is event delegate in c#?

705


Why objects are stored in heap in c#?

561