Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27186

StreamWriter

$
0
0
Can anyone tell me why i cant use the following to write to file please......


Class clsLogs
'Dim FilePath As String = Environment.CurrentDirectory
Dim FilePath As String = Environment.CurrentDirectory



Public Shared Sub SystemLogs(ByVal AddlogEntry As String)
Dim AddSystemlogEntry As String = AddlogEntry


Dim strFile As String = FilePath & "\logs.txt"


Dim sw As StreamWriter

'Dim sw As StreamWriter = New StreamWriter("c:\P\logs.txt", True)
sw.WriteLine(AddSystemlogEntry)
sw.Close()
sw = Nothing

End Sub

Viewing all articles
Browse latest Browse all 27186

Trending Articles