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's the c# syntax to catch any possible exception?
What is the difference between a function and a method?
Explain the accessibility modifier protected internal?
What is Inheritance in C#?
What is the syntax for calling an overloaded constructor within a constructor?
Can an int be negative c#?
What is the difference between xml documentation tag?
Difference between value and reference type.
What is int32 in c#?
What is the difference while using directive vs using statement ?
What is ac callback?
explain Garbage collector’s functionality on unmanaged code
What are custom exceptions? Why do we need them?
What is wpf c#?
Can arraylist store different data types in c#?