Dim fileLoc As String = "c:\users\" & Environment.UserName & "\downloads\users.txt"
If 1 + 1 = 2 Then <--- not very professional but it works! it works....
Dim fs As FileStream = Nothing
If (Not File.Exists(fileLoc)) Then
fs = File.Create(fileLoc)
Using fs
End Using
End If
End If
If File.Exists(fileLoc) Then
Using sw As StreamWriter = New StreamWriter(fileLoc)
sw.Write(pcname.Text)
End Using
End If
This is the correct code! thank you all for thinking with me!