What is boxing and unboxing?

Answer Posted / maloy.adhikari

Converting a value type to reference type is called Boxing
and Converting reference type of value type is Unboxing.

int i = 1;
object o = i; // boxing
int j = (int)o; // unboxing

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of a web form?

552


what is scalar property?

607


My organization went through the approval process of supporting the .net framework 2.0 in production. Do we need to go through the same process all over again for the .net framework 3.0? Do I need to do any application compatibility testing for my .net framework 2.0 applications?

551


What is the difference between adding routes, to a webforms application and to an mvc application?

545


Is it possible to create a custom filter?

561






Is the following route definition a valid route definition? {controller}{action}/{id}

751


How do you handle variable number of segments in a route definition?

530


Is .net core replacing .net framework?

467


Explain the role of assembly in the .net framework.

564


What are Validation Annotations?

572


Explain what platforms does the .net framework run on?

546


What is the difference between partial and renderpartial?

493


What are the versions of .net framework?

533


Can a view be shared across multiple controllers? If yes, how we can do that?

587


How does work clr?

531