adspace


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


Please Help Members By Posting Answers For Below Questions

Why can't we use a static class instead of singleton?

954


Which namespaces are necessary to create a localized application?

1142


How do you inherit a class into other class in c#?

995


How to assign Null value to Var?

1064


What is an abstract class c#?

969


What is expression tree in c#?

998