I need to clear the contents of a particular file every time the applications starts. How do I do it?
See Question&Answers more detail:osI need to clear the contents of a particular file every time the applications starts. How do I do it?
See Question&Answers more detail:osYou can use the File.WriteAllText method.
System.IO.File.WriteAllText(@"Path/foo.bar",string.Empty);