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 are the contents of an assembly ?
What is datareader c#?
What is difference between array and list?
how can one use hcl and c sharp together?
What is a protected class c#?
What is int parse in c#?
Can non-default constructors be used with single call sao?
What are object pooling and connection pooling and difference between them?
How does dependency injection work c#?
What is private virtual in C#?
What are the concepts of dispose method?
How do I format a string in c#?
What is event and delegates in c#?
Why constructor is used in c#?
What are c# i/o classes?