What is boxing?

Answer Posted / maloy.adhikari

Boxing is the process of converting a value type to the
type object or to any interface type implemented by this
value type. When the CLR boxes a value type, it wraps the
value inside a System.Object and stores it on the managed
heap. Unboxing extracts the value type from the object. In
the following example, the integer variable i is boxed and
assigned to object o.
Exam::
int i = 123;
object o = (object)i; // boxing
...........
o = 123;
i = (int)o; // unboxing

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I want to connect a system in LAN and I want to access that. Whenever I am moving a mouse in my desktop, the similar thing has to happen in another system in which I have connected. I need coding for this in C# and ASP.NET Can anyone please help me. It is very urgent. Thanks in advance. My email id is manojkumarchallagundla@gmail.com Will you please?

1455


Which is better session or viewstate?

504


benefits of migration from asp to asp.net hi frnds, i have to give presentation to a client about how useful would be migrating their project from asp to asp.net .plz give me some points which i should incorporate in my ppt thanks

1758


In a Repeater control how one can provide an alternating color scheme ?

560


What is Web API?

643






how can create login from create and written conde in asp.net

1773


What is asp.net used for?

595


What is the difference between system.stringbuilder and system.string

255


1.What r collections? 2.What is .pdb file? 3.Is it possible to provide access to users in master page? 4.What is dirty n Phantom Read(SQL)? 5.What r different isolation levels(SQL)? 6.How to set authentication mode in web.config file?

1778


How do you declare delegates and are delegates and events one and the same and explain how do you declare delegates and invoke them ?

3398


What is session object? Describe in detail.

558


How many types of session state management options available in asp.net?

532


Mention the namespace that is used to include .net data provider for sql server in .net code?

499


What is postback pixel?

517


What is the use of service provider?

582