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

If c# destructors are so different to c++ destructors, why did ms use the same syntax?

498


What is the difference between package and interface?

495


What is definition in c#?

479


what is a static constructor?

674


What are extensions methods in c#?

473






How does c# achieve polymorphism?

473


How jit (just in time) works?

512


What is ControlBox Propertie

577


What is global namespace in c#?

488


Can we inherit sealed class in c#?

471


How can an inner class access the members of outer class?

542


What is the difference between interface and functional interface?

493


What is the implicit name of the parameter that gets passed into the set method/property of a class?

499


Can a constructor have a return type?

499


What is difference between virtual and override in c#?

462