Wrox Programmer Forums
|
Pro VB.NET 2002/2003 For advanced Visual Basic coders working .NET version 2002/2003. Beginning-level questions will be redirected to other forums, including Beginning VB.NET.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB.NET 2002/2003 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 7th, 2003, 12:37 AM
Registered User
 
Join Date: Jun 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Utpal
Default Question about boxing

Hi everybody,
Does converting an integer to a string involve boxing?
 
Old June 7th, 2003, 02:45 AM
Authorized User
 
Join Date: Jun 2003
Posts: 33
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It may do...... the only thing I have come across in VB.NET that uses boxing of the primitive data types behind the scenes is when you call one of the generic object methods on a primitive data types and I believe that the toString method is a generic object method.

I think what must happen is that the integer is boxed to an object, then the toString method is called on the object, which produces the string. I dont think this involves unboxing the object though.

One thing to remember about boxing is that if you 'box' and integer into an object, it must be 'unboxed' to the same type (ie, an integer in this case).

Quote:
quote:Originally posted by Utpal
 Hi everybody,
Does converting an integer to a string involve boxing?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Advanced Details of Boxing? ratheesh_param ASP.NET 1.x and 2.0 Application Design 2 November 8th, 2006 03:16 AM
Letter Boxing and Crystal Report ask4jm Crystal Reports 0 August 26th, 2004 03:50 AM
just a question gmoney060 BOOK: Beginning ASP 3.0 15 June 18th, 2004 10:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.