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
Describe the ways of cleaning up objects in c#.
Why do I get an error (cs1006) when trying to declare a method without specifying a return type?
What benefit do you get from using a primary interop assembly (pia)?
How we convert private assembly into public assembly?
Why singleton pattern is used in c#?
What are the types of comments in c#?
How do I create multifile assembly?
Explain About ADO and its objects
Is string value type c#?
What is selector c#?
How do partial classes work in c#?
What do you mean by expression tree?
Why do we need to call CG.SupressFinalize?
Is c# code is managed or unmanaged code?
What does get set mean in c#?