.Net Almanac

Wednesday, October 26, 2005

Writing to a Text File

Although it is one of the mostly used and simplest tasks, people forget it all the time and need to remember before using it. It goes like this:

TextWriter writer = new StreamWriter("filename.txt");

writer.WriteLine("Anything you want...");

writer.Close();

0 Comments:

Post a Comment

<< Home