What is the Difference between value and reference type?
Answer Posted / nithya
value type variable :
If the valuetype variable data is copied to another
variable, its actual data is not effected.
eg., for valuetype variables are
char,boolean,structures,enumerations .
eg.
dim m.n as integer
m=100
n=200
reference type variable:
variable doesnt stores the actual data, instead it has a
pointer . that pointer will points to the actual data
location
eg., for reference type variabls are array,class .
eg.
dim a,b as integer
a=5
assume, a is in the memory locatyion of 1001.
that address value will be stored to the another variable
say b whose address is 1020
| Is This Answer Correct ? | 6 Yes | 9 No |
Post New Answer View All Answers
What is array class in c#?
What can I create with c#?
What is c# in asp net?
Is std :: string null terminated?
What is meant by collections in c#?
Is a valid int value?
What is a console operator?
Define property in c#.net?
Is array immutable in c#?
What is the difference between int and int in c#?
What is serialization of data?
Why do we need to serialize data?
What are the different types of delegation?
What is console readkey ()?
Can you store strings in arrays?