csharp Write line to file

string LogFile = "C:\test.log";
FileStream filestream = new FileStream(LogFile, FileMode.Append);
StreamWriter streamwriter = new StreamWriter(filestream);

streamwriter.WriteLine("Text goes here");
streamwriter.Close();
streamwriter.Dispose();

filestream.Close();
filestream.Dispose();
Writes a line to a text file.

Updated: Sunday 10th October 2010, 11:23am

There are 0 comments

Leave a comment of your own

Comments are currently closed.