Boxing and unboxig

If a value type is stored on managed heap memory as reference type we can call it as boxing
int x=100;
object obj=x;//boxing

If at all value type present on heap memory if again transfer to stack memory we call it as unboxing

int y= (int) obj;//unboxing
Ebook Download
View all
Learn
View all