Generation

generate functionFri, 16 Jun 2023

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"); } }

Want to kickstart your project?Use the new AI Studio to create your code