Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 5th, 2006, 08:31 PM
Registered User
 
Join Date: Nov 2006
Location: Roseville, CA, USA.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Page 222 Step 5

What is the point of the 'filePath' string? In this exercise the string 'strFileName' contains the same information and no extra steps are needed to concatenate the two paths. I do not understand the combine method or the reason for using it.

   Dim filePath As String
                'Open or Create the file
                filePath = System.IO.Path.Combine( _
                    My.Computer.FileSystem.SpecialDirectories.MyDocume nts, _
                    objSaveFileDialog.FileName)
                'Replace the contents of the file
                My.Computer.FileSystem.WriteAllText(filePath, txtFile.Text, False)

  #2 (permalink)  
Old November 6th, 2006, 06:43 AM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
Default

The code that you have shown here was the old code that was inserted by Visual Studio prior to the RTM version. This has been changed in the RTM version of Visual Studio to a single line of code as you should have discovered when performing this exercise.

Thearon
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Try it Out Chapter 18 Page 587 Step 4 workib BOOK: Beginning Microsoft Visual C# 2008 ISBN: 978-0-470-19135-4 0 November 6th, 2008 02:01 PM
Chapter 16 Try It Out Page 498 Step 7 workib BOOK: Beginning Microsoft Visual C# 2008 ISBN: 978-0-470-19135-4 1 October 9th, 2008 08:22 PM
step of opening a web page somnath.kartic VS.NET 2002/2003 0 March 30th, 2006 03:24 AM
We Based Database Step By step desireemm SQL Language 1 October 15th, 2005 08:15 PM



All times are GMT -4. The time now is 02:44 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.