using System;
using System.IO;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
using (TextWriter twriter = File.CreateText("d:\\data.txt"))
{
twriter.WriteLine("Text File Line one");
twriter.WriteLine("Text File Line two");
twriter.Write("Text File Line three");
}
}
}
}
/*
run:
data.txt:
---------
Text File Line one
Text File Line two
Text File Line three
*/