Realizar un programa para guardar datos en un archivo de texto en c#
public void SaveToFile(string text) { var path = "../../files/text.txt"; try{ using(StreamWriter sw = new StreamWriter(path, true)){ sw.WriteLine(text); } }catch{ Console.WriteLine("Error creando el archivo"); } }