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

How is method overriding different from overloading?

787


Difference between Value type & reference types ? and give the example in .Net?

733


Explain copy constructor?

904


Which technology is best for desktop application?

660


What are c# collections?

696


Write a program to create a user control with name and surname as data members and login as method and also the code to call it. (Hint use event delegates) Practical Example of Passing an Events to delegates

695


Differentiate between response.expires and response.expiresabsolute?

772


What do you know about WM_CHAR message?

775


What is the use of base keyword? Tell me a practical example for base keyword’s usage?

740


What is the difference between static class and sealed class in c#?

704


What is global namespace in c#?

729


What are the differences between a class and a struct?

730


What is dataset and dataadapter in c#?

707


Why attributes are used in c#?

663


What is dynamic object in c#?

720