What is the Difference between value and reference type?

Answer Posted / ravi

1. value type contain variable and reference type are not
containing value directly in its memory.
2.memory is allocated in managed heapin reference type and
in value type memory allocated in stack.
3.reference type ex-class
value type-struct, enumeration

Is This Answer Correct ?    36 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can class be protected in c#?

515


Why do we use class in c#?

472


Explain Constructor and destructor?

521


How can I make sure my c# classes will interoperate with other .net languages?

524


Is c and c# the same?

496






What is an escape sequence?

512


What do you mean by jagged arrays in c#?

476


Explain the difference between .net and c#?

493


What is delegation in oops?

514


What are variables in c#?

485


What is a partial class in c#?

485


Define parsing?

501


What is uint64?

514


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

538


What is data annotation in c#?

501