What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2021-11-07 05:58:10
create file if not exists c#
You can simply call using (StreamWriter w = File.AppendText("log.txt")) It will create the file if it doesn't exist and open the file for appending. Edit: This is sufficient: string path = txtFilePath.Text; using(StreamWriter ... Add solution