Title says it all, I want to put a .txt files TEXT into a Dimmed String. How?
Dim TempStorage As String
TempStorage = FilePath.Text.ReadAllText
Something like that?
Printable View
Title says it all, I want to put a .txt files TEXT into a Dimmed String. How?
Dim TempStorage As String
TempStorage = FilePath.Text.ReadAllText
Something like that?
To read the file into a string that is not an array you call ReadAllText. If you want an array you call ReadAllLines.
vb.net Code:
Dim textContents As String = IO.File.ReadAllText("C:\path\file.txt")
thanks