VB.NET - Read a file in the My Documents folder



Read a file in the My Documents folder


'Dim filename as String = "c:\syntaxhelp.txt"

Dim fullFilePath As String
Dim fileContents As String
With My.Computer.FileSystem
    fullFilePath = .CombinePath(.SpecialDirectories.MyDocuments, filename)
    fileContents = .ReadAllText(fullFilePath)
End With

Share |

 Cant find the page you are looking for?
 Help us to improve by adding the content that you are looking for.
 Leave a feedback
 We look forward to hear your comments and feedback.