Wrox Programmer Forums
|
BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6
This is the forum to discuss the Wrox book Beginning Visual Basic 2005 by Thearon Willis, Bryan Newsome; ISBN: 9780764574016
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual Basic 2005 ISBN: 978-0-7645-7401-6 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 February 2nd, 2008, 10:31 PM
Registered User
 
Join Date: Feb 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Errata Entry Question

In the Errata there is a posting for pages 76 & 77 Error in Code that states, "Last line should be MessageBox.Show(dblArea.ToString, "Area").

dblArea is declared as Double. Why is it necessary to convert it to a string? The program runs with, or without, the addition of "ToString".

Is there ever a time when one would want to convert a Double to a String? If so, when?

Thanks.

 
Old February 4th, 2008, 07:26 AM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
Default

In Visual Basic 2005 it is not necessary to convert the value contained in dblArea to a string to display it in a message box unless you have Option Strict turned on. The Show method of the MessageBox class expects a string value to display thus we have included the ToString method to convert the double value to a string.

I hope this clears this up for you.

Thearon





Similar Threads
Thread Thread Starter Forum Replies Last Post
date entry Tim Johnson Access 1 December 26th, 2007 08:18 AM
Transfering an entry scandalous Access 1 February 13th, 2007 08:36 AM
Chapter 9 Question - errata? feck BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 0 January 27th, 2007 04:10 PM
Always a New entry scandalous Access 3 January 26th, 2007 04:02 PM
0 entry prob dreamdragon Classic ASP Basics 3 December 12th, 2004 05:42 PM





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