1string text = "Hello World"; 2 3System.IO.TextWriter tw = new System.IO.StreamWriter("c:\\output.txt"); 4tw.WriteLine(text); 5tw.Close();