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
How do I create a .exe file?
What does static mean in c sharp?
Does c# support #define for defining global constants?
What is the difference between field and variable in c#?
What’s a strong name?
What is a property c#?
What is remote data?
What is the difference between virtual method and abstract method?
How does one compare strings in c#?
Write a program to create a user control with name and surname as data members and login as method and also the code to call it. (Hint use event delegates) Practical Example of Passing an Events to delegates
How do you read an Excel sheet in C#?
How do I link two windows forms in c#?
User's session is explicitly killed by which method ?
Define sealed classes in c#?
Can hashtable have duplicate keys?