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

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 27246

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>