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 November 5th, 2006, 08:31 PM
Registered User
Join Date: Nov 2006
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, _
                'Replace the contents of the file
                My.Computer.FileSystem.WriteAllText(filePath, txtFile.Text, False)

Old November 6th, 2006, 06:43 AM
Thearon's Avatar
Wrox Author
Join Date: Dec 2003
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts

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.


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

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