Skip to content

Instantly share code, notes, and snippets.

@ryasmi
Last active December 10, 2015 18:38
Show Gist options
  • Save ryasmi/4475463 to your computer and use it in GitHub Desktop.
Save ryasmi/4475463 to your computer and use it in GitHub Desktop.
This Gist is for reading and writing files in Visual Basic and is based on my YouTube tutorial (http://www.youtube.com/watch?v=1TKdNy2lDH0&list=PL63C2673281C99172&index=2).
' Tutorial @ http://www.youtube.com/watch?v=1TKdNy2lDH0&list=PL63C2673281C99172&index=2
Imports System.IO
Public Class Form1
Private Sub readFile() Handles Button1.Click
Dim Location As String = ""
Dim Reader As New StreamReader(location, false)
TextBox1.Text = Reader.ReadToEnd
Reader.Close()
End Sub
Private Sub writeFile() Handles Button2.Click
Dim Location As String = ""
Dim Writer As New StreamWriter(location)
Writer.Write(TextBox1.Text)
Writer.Close()
End Sub
End Class
@xmanemran
Copy link

Nice Boss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment