using System; using System.Collections.Generic; using System.IO; using System.Text; namespace StreamWriterExample { class Program { static void Main(string[] args) { using (StreamWriter sw = new StreamWriter(args[0])) { sw.WriteLine("Writing text files is easy"); } } } }