My.Application.Info.DirectoryPath
Public Class Tester
Public Shared Sub Main
Dim csvFile As String = My.Application.Info.DirectoryPath & "\Test.csv"
Dim outFile As IO.StreamWriter = My.Computer.FileSystem.OpenTextFileWriter(csvFile, False)
outFile.WriteLine("Column 1, Column 2, Column 3")
outFile.WriteLine("1.23, 4.56, 7.89")
outFile.WriteLine("3.21, 6.54, 9.87")
outFile.Close()
Console.WriteLine(My.Computer.FileSystem.ReadAllText(csvFile))
End Sub
End Class
Related examples in the same category