Saturday, October 31, 2009

How to write text to file in C#

using (StreamWriter sw = File.CreateText(@"C:\test.txt"))
{
sw.Write("Some text");
}

No comments:

Post a Comment