What is the Difference between value and reference type?
Answer Posted / ajay
whenever a datatype is defined based on a structure it is said to be value type datatype.
whenever a datatype is derived from class definition then it is said to be reference type datatype.
value type memory allocated in stack
reference type memory allocated in heap
Inheritance is not support by the Value type members
Inheritance is support by the Reference type members
Value type data type are byte,int,uint,float,Double,decimal,char and bool
Reference type data type are string,class,objects,Enwn,interface and delegates
| Is This Answer Correct ? | 6 Yes | 6 No |
Post New Answer View All Answers
What is interface inheritance?
How do you specify a custom attribute for the entire assembly (rather than for a class)?
What is difference between private and protected in c#?
What is int tryparse in c#?
What’s a strong name?
How to use delegates with events?
What is the difference between a method and a property?
What will be the output of the following code?
What is .net c#?
What is a verbatim string literal and why do we use it?
Which operator cannot be overloaded in c sharp?
Where are value types stored in c#?
What is dll hell, and how does .net solve it?
What is difference between internal and protected internal in c#?
Which technology is best for desktop application?