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

Explain anonymous type in c#?

530


Write a short note on interface?

590


What is the purpose of c#?

558


What language is c# similar to?

490


Is dictionary a collection?

478






How can I get the ascii code for a character in c#?

574


What is the keyword used to prevent a class from being inherited by another class?

674


What is winforms c#?

491


Does the system.exception class have any cool features?

515


What is the c# equivalent of c++ catch (…), which was a catch-all statement for any possible exception? Does c# support try-catch-finally blocks?

519


How main method is called in c#?

523


Is there regular expression (regex) support available to c# developers?

535


How do you concatenate in c#?

498


Are cao stateful in nature?

483


write a c# program add two matrix with input number ?

569