Boxing:
It is a process of converting value type into Reference Type.
UnBoxing:
It is a reverse process of Boxing i.e. Converting Reference Type
into Value Type.
Here is the Example :
class Test
{
static void Main() {
int i = 123;
object o = i; //boxing
int j = (int) o; //unboxing
}
}
15 years ago
No comments:
Post a Comment