write to file vb.net code example
Example 1: write to text file vb.net
'streamwriter allows us to write to a file
Dim file As System.IO.StreamWriter
file = My.Computer.FileSystem.OpenTextFileWriter([FileName], True)
file.WriteLine([text])
file.Close()
Example 2: write to text file vb.net
Dim [FileVar] As String = Application.StartupPath & "/[FileName]"
FileOpen(1, [FileVar], OpenMode.Append)
PrintLine(1, text)
FileClose(1)