// The StreamReader are using the Namespaces: System and system.IO using (StreamWriter sw = new StreamWriter("c:WriteLines.txt")) //path { sw.WriteLine("Here goes the text"); }