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

Answer Posted / poornima

Value Types:

All numeric data types

Boolean, Char, and Date

All structures, even if their members are reference types

Enumerations, since their underlying type is always SByte,
Short, Integer, Long, Byte, UShort, UInteger, or ULong

Reference Types:
String

All arrays, even if their elements are value types

Class types, such as Form

Delegates

1..In value type data stored on stack memory.
2..In reference type data stored on heap memory.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of console application in c#?

691


What are escape sequences explain with example?

741


What is the function of .IsDescendent()?

786


What are the types of attributes in c#?

694


Explain 'structure padding'?

918


Can you declare struct members as protected?

686


How Is The Dll Hell Problem Solved In .net?

785


What is the value which is accepted by all data types ?

757


Hello! How to do this: "Create manifest utility intended for creating update content files. Application should take a set of files as input parameter and generate XML based manifest file as output one." I use C# and vs.net 2003. It's urgent! Help please, thanks. Mayana

1698


How to implement an object pool in c#.net.

789


What are the various components in crystal reports?

712


What is the difference between gettype and typeof in c#?

660


Explain about finalize method?

735


Why is lazy loading?

668


What does void do in unity?

717