Hi,
What is boxing in C#?
Printable View
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/l...g-unboxing.htm
the above link give you more details with source code sample.
throt.
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.
nice thread , i didn't aware of this before but got some hint from google after searching answer for your question ,
Nice thread and good question, thanks to all of you for sharing your views on this topic.
I know about this before also, but now I have forgotten about it and brush up again after reading the post.
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...-unboxing.aspx