What is the Difference between value and reference type?
Answer Posted / amit kumar
Value Type:
When you assign value to value type variable to
another variable then it's value only copy to another
variable. It allocates memory in stack. Here both variables
work independent.
Reference Type:
When you assign value to reference type variable to
another reference type variable then it's value doesn't
copy both variables are dependent to each other and if you
change one value it reflects in other one. It allocates
memory in the heap data structure.
Is This Answer Correct ? | 25 Yes | 12 No |
Post New Answer View All Answers
How big is an int in c#?
What's the difference between system.string and system.text.stringbuilder classes?
How to properly clean up excel interop objects?
What is array and types of array in c#?
Explain “static” keyword in c#?
What is semaphore in c#?
What are strongly typed objects?
What is dll hell, and how does .net solve it?
Who is a accessibility modifier “protected internal†available to ?
What is sqladapter c#?
What are the desktop applications?
Is enum a class c#?
What is the adv of using System.Text.StringBuilder over System.String?
How does dll hell solve in .net?
List down the differences between “dispose” and “finalize” methods in c#.