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
Why do we need collections in c#?
Which namespaces are necessary to create a localized application?
Why interface is required?
What is the difference between static and private constructor?
How Global.asax is used ?
What is Implementation inheritance
What is the difference between list and arraylist c#?
Explain the functionalities of satellite assembly?
What is string [] args in c#?
What exactly happens when we debug and build the program?
Can a private virtual method can be overridden?
Why dictionary is used in c#?
What are some of the commonly used commands in sqlcommand?
Why would you use a class property in c#?
What are the new features in c# 2.0?