Value Type |
Reference Type |
||||||||||||||||||||||||||||||
i) Value Type variable contains the value itself. |
i) Reference Type variable that contains reference or address of the actual data. |
||||||||||||||||||||||||||||||
ii) Value Type stores data in stack. Eg:- int a = 100;
|
iii) Reference Type stores data in managed heap and stores address of the data in stack.
Eg:-
int a=100;
Object obj1 = a;
|
|
|
|
| ||||||||||||||||||||||||||||||
iv) Value Types are:-
a)
Integral types (sbyte, byte, short, ushort,
int, uint, long, ulong)
b)
Bool type
c)
Char type
d)
Floating point type (float, double)
e)
Decimal type
f)
Struct types
g)
Enumeration types
|
iv) Reference Types are :-
a)
Object type
b)
Class type
c)
Interfaces
d)
Delegates
e)
String type
f)
arrays
|
Saturday, 1 July 2017
Difference between Value Type and Reference Type?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Note: only a member of this blog may post a comment.