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
Who introduced c#?
Is it possible to have different access modifiers on the get/set methods of a property?
What is lazy loading and eager loading in c#?
Can we use "this" command within a static method?
Where are value types stored in c#?
Is arraylist generic in c#?
What is the difference between namespace and class in c#?
What do u mean by delegation?
what is main function of alternate teamplate of datalist?
What is the use of 0 in c#?
Explain constructor in c#?
What is variable and its classification?
How to generate strong name key file or which command is used to generated strong name key file?
What is the difference between string keyword and system.string class?
What is the difference between System.console.WriteLine() and System.console.Write() function?example?