Write mutiple lines to a text file using Visual Basic
问题 I'm trying to check to see if a file exists, if so it does nothing. If the file does not exist is creates the text file. Then I want to write text to that file. Where am I going wrong with this code? I'm just trying to write multiple lines to the text file and that part is not working. It is creating the text file... just not writing to it. Dim file As System.IO.FileStream Try ' Indicate whether the text file exists If My.Computer.FileSystem.FileExists("c:\directory\textfile.txt") Then Return