PDA

View Full Version : Boxing in C#



jeetendraets
09-22-2011, 08:34 AM
Hi,
What is boxing in C#?

vyarthrot
02-01-2013, 03:46 AM
Hi,
What is boxing in C#?

C# Type System contains three Types , they are Value Types , Reference Types and Pointer Types. C# allows us to convert a Value Type to a Reference Type, and back again to Value Types . The operation of Converting a Value Type to a Reference Type is called Boxing and the reverse operation is called Unboxing.

http://csharp.net-informations.com/language/csharp-boxing-unboxing.htm

the above link give you more details with source code sample.

throt.

nrvaghela
04-01-2013, 08:36 AM
You can refer this link, you will have complete idea about Boxing in C#
http://msdn.microsoft.com/en-us/library/yz2be5wk.aspx

Hope this link will provide you whole information.

Thanks.

Raju
04-04-2013, 08:36 AM
nice thread , i didn't aware of this before but got some hint from google after searching answer for your question ,

noahwilson
04-27-2013, 10:00 AM
Nice thread and good question, thanks to all of you for sharing your views on this topic.

links123
05-28-2013, 06:56 AM
I know about this before also, but now I have forgotten about it and brush up again after reading the post.

mikerock
05-30-2013, 01:23 PM
Boxing and Unboxing are used to convert value types into reference types and vice versa. Developers often need to make some methods generic and hence create methods that accept objects rather than specific value types.

for more info please check - http://careerride.com/CSharp-uses-of-boxing-and-unboxing.aspx