What is boxing and unboxing ?

Answer Posted / rahultripathi

There is two type datatype available Value and reference
type . value are stored in stack and reference type used
in heap . when we copy data from stack memmory to heap it
call Boxing .


Int32 x = 10; object o = x ; // Implicit
boxing
Int32 y = 10;

unboxing : copy data from heap memory to stack called
unboxing
object obj = (object) y; // Explicit Boxing


Rahul Tripathi
raultripathi@myway.com

Is This Answer Correct ?    18 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the various ways to send content from one page to another?

524


How does the iis work?

546


Can we set master page as a start page?

547


Which method do you use to enforce garbage collection in .net?

520


Explain a program using razor view engine to create a simple application? : asp.net mvc

500






Explain the page lifecycle of an asp.net mvc? : asp.net mvc

438


Difference between .NET and previous version?

2106


What is a 401 redirect?

513


What is the recommended approach for asp.net mvc to globally intercept exceptions? What other functionality can be implemented with the approach? : Asp.Net MVC

502


What is viewstate? In which event of the page life cycle, is the viewstate available?

605


What do you understand by aggregate dependency?

618


How we implement web farm and web garden concept in asp.net?

541


What are the different types of proxy patterns?

596


Explain the asp.net mvc folder conventions? : asp.net mvc

508


Can we use MSSql as backend in asp.net...if yes then How.?

583