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
What is sqlcommandbuilder c#?
How many digits are in an integer?
What is the difference between integer and double?
What is the difference between a class and an object c#?
Can we customize the serialization process?
what is the index value of the first element in an array?
What is dataset c#?
What does ienumerable mean?
What does mean before a string in c#?
Is php better than c#?
Differentiate between response.expires and response.expiresabsolute?
Explain states of a thread in c#?
How to use delegates with events?
What is overriding in c#?
Distinguish between system.string and system.text.stringbuilder classes?