string docPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); StreamWriter outputFile = new StreamWriter(Path.Combine(docPath, "salida.txt"))); outputFile.WriteLine("Esto es una línea"); outputFile.WriteLine("Esto es otra"); outputFile.Close();