What is value type and reference type?

Answers were Sorted based on User's Feedback



What is value type and reference type?..

Answer / usman

In simple words value types are those datatypes that store
there values on stack memory and values are settle down at
compile time example are "ENUM" and reference type are
those datatype that store there values in heap memory and
settle down while run time i.e dynamic types examples are
strings,class type etc

Cheers

Is This Answer Correct ?    10 Yes 1 No

What is value type and reference type?..

Answer / kishore

Value types are the variables that directly contain the
vaiue and are stored in stack memry.
Example: int, char, float...

Reference types does not contain the value directly but has
the address of the value i.e reference address..
Reference types are stored in Heap memory.

Is This Answer Correct ?    1 Yes 1 No

What is value type and reference type?..

Answer / sushma

value types store values,even if we copy that the orginal
one it is uneffected,even if we modify the copied one ,
the reference types stores refereneces of the object, if
copy that one ,it is effected,if we modify the copied one

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What are custom exceptions in C#?

0 Answers   Arigo Infotech,


Differentiate between copy and default constructor.

0 Answers   TCS,


Is a decimal an integer?

0 Answers  


What are the different types of literals in c#?

0 Answers  


What is the purpose of ienumerable in c#?

0 Answers  


Which controls do not have events?

0 Answers  


What does convert toint32 mean?

0 Answers  


How to use exception handling in stored procedure?

0 Answers   Wipro,


What is covariance and contravariance? Did Delegate and method overriding support these?

1 Answers   TCS,


Explain the three services model (three-tier application). Presentation (ui), business (logic and underlying code) and data (from storage or other sources).

0 Answers  


What is the relationship between a process, application domain, and application?

0 Answers  


What is Dispose method in .NET?

3 Answers  


Categories