How can I clear the content of a text file using C# ?
File.WriteAllText(path, String.Empty);
Alternatively,
File.Create(path).Close();
2.1m questions
2.1m answers
60 comments
57.0k users