SyntaxFix
Write A Post
Hire A Developer
Questions
Just open the file with the FileMode.Truncate flag, then close it:
using (var fs = new FileStream(@"C:\path\to\file", FileMode.Truncate)) { }