What is difference between value and reference types ?
Answer Posted / thirupathi reddy
value refers what is present in the address of the memory
Reference type refers to the address of the memory
Ex:
int a = 10( here the value stores in the address 'a' and the value of that address is 10)
int b = &a (here the variable b refers the address of
the variable a)
here if we print("%d",a) the value prints
here if we print("%d",b) the reference value of a is printed.
this is the difference between "value" and "reference values"
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
What do you mean by saying a "class is a reference type"?
Why is main static in c#?
what is an exception in .net?
What is argument in c#?
Explain the use of virtual, sealed, override, and abstract method?
What is satellite assembly? And steps to create satellite assembly?
Suppose two interfaces have same method, so how will you implement these methods in derive class?
What is the difference between integer and double?
Is c# easier than c++?
What is a thread? What is multithreading?
What is Dependency of Injection?
what is c# command?
What is generic in c#?
What is private readonly in c#?
What is difference between events and delegates?