Thursday, June 21, 2012

Creating and Writing Text in Text File


/// <summary>
/// Creating Text File
/// Writing in Text file
/// </summary>
public void CreatingTextFile()
{
string filename = "test1.txt";
string text = " this text should be written in file";
using (StreamWriter writer = new StreamWriter(filename))
{
writer.Write(text);
}

}

No comments:

Post a Comment