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
How do I calculate relative time?
how to prevent a class from being inherited in c#.net?
Explain the difference between .net and c#?
How many bytes is an int?
What is web forms in c#?
What is the difference between system.string and system.text.stringbuilder classes?
What is a .aspx file?
What does return do in unity?
What is dll hell, and how does .net solve it?
Why is aws serverless?
Why do we need indexers in c#?
Can we inherit sealed class in c#?
What is array and arraylist?
What is difference between singleordefault and firstordefault?
Why data types are important in c#?