This Visual Basic Tutorial is all about Reading Text Files.
The My.Computer.FileSystem object has a method that allows you to read a text file and it is called the ReadAllText. The encoding file can be specified if the file contains an encoding text such as ASCII or UTF-8.
You need to specify the encoding file , if you are reading from a file with an extended characters.
- <pre>Dim fReader As String
- fReader = My.Computer.FileSystem.ReadAllText("C:\testfile.txt")
Example of Encoding File:
- Dim fReader As String
- fReader = My.Computer.FileSystem.ReadAllText("C:\testfile.txt",
Readers might read also: