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)
|