Created
February 5, 2014 14:26
-
-
Save facebookegypt/8824653 to your computer and use it in GitHub Desktop.
VB 2010 Read Text Files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Visual basic online course | |
'Read Text Files in VB 2010 | |
Private Sub Form1_Load(sender As System.Object, _ | |
e As System.EventArgs) Handles MyBase.Load | |
'Path to file | |
Dim LocalFilePath As String = Application.StartupPath & "\MyFile.txt" | |
Dim fileReader As String | |
FileReader = My.Computer.FileSystem.ReadAllText(LocalFilePath, | |
System.Text.Encoding.ASCII) | |
TxtFromFile.Text = FileReader | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment