I need to clear the contents of a particular file every time the applications starts. How do I do it?
You can use the File.WriteAllText method.
System.IO.File.WriteAllText(@"Path/foo.bar",string.Empty);
1.4m articles
1.4m replys
5 comments
57.0k users