log file

jstewart

Member
Joined
Jun 18, 2003
Messages
6
how do you create a log file? sorry for all the questions, im relearning vb with vb.net, i know vb6, and its proving tough for me, so thanks!
 
You need to create a StreamWriter object (you can use the File.CreateText() method to create/open a textfile writer) and then write to that.

For example,
Code:
Dim sw As IO.StreamWriter = IO.File.CreateText("C:\logfile.text")
sw.WriteLine("Action logged at " & Now & " : Moo")
sw.Close()
 
Back
Top