I have the following code:
If line = Nothing Then
MsgBox("Login failed.")
Using sw As New StreamWriter(File.Open(Index.strLogPath, FileMode.OpenOrCreate)) ' open or create a new file at our path
sw.BaseStream.Seek(0, SeekOrigin.End) ' append new users to the end
sw.AutoFlush = True
sw.WriteLine("line is nothing")
sw.Flush()
sw.Close()
End Using
End If
My line = nothing condition is met, the msgbox pops up letting me know, but the file is not created. If the file is there, nothing is added to it.
I have checked the path validity, and ensured that applications have permission there, everything I can think of isn't working, and to make it more frustrating there are no errors! Any help would be greatly appreciated.