Code2Know
Boxing and Unboxing
Conversion of the value type to the reference type is known as boxing - implicit
V > O
int v = 1; object o = v;
Converting the reference type back to the value type is known as unboxing - explicit
O > V
object o = 5; int v = (int) o;
ref & out
Both support the same type, Array is for fixed size and ArrayList is dynamic
Both support the same type, Array is for fixed size and ArrayList is dynamic
No comments:
Post a Comment