hello!
I need to see if a text file exists...
can someone give me the code to read a text file, or the equal opposite of this:
I need to see if a text file exists...
can someone give me the code to read a text file, or the equal opposite of this:
VB.NET:
Dim strName As New System.IO.FileStream(Application.StartupPath & "\" & Me.TextBox1.Text & ".txt", IO.FileMode.OpenOrCreate, IO.FileAccess.ReadWrite)
Dim sw As New IO.StreamWriter(strName)
sw.WriteLine("User Name: " & Me.TextBox1.Text)
sw.WriteLine()
sw.WriteLine("Password: " & Me.MaskedTextBox1.Text)
sw.Close()
sw.Dispose()
MyBase.Close()