Introduction
In this example, explaining in detail difference between Boxing and Unboxing in ASP.Net. Boxing is the process of converting value type to object type and unboxing is reverse process of object type to value type. I have illustrated the concept as given below:Boxing
Int i; I=78; Object o = i; (Boxing)
Unboxing
Int i; Object o; o = 8; i = (int)o; (Unboxing)
i = o; (Unboxing)
ReplyDeleteAbove line is totally wrong.
It need the casting like:
i = (int)o;
thanks, it's corrected now :)
Deletethanks..แทงมวย
ReplyDelete