I am writing actions done by the program in C# into a file by using Trace.Writeln() function. But the file is becoming too large. How to truncate this file when it grows to
By doing this:
if(new FileInfo("").Length > 1000000) { File.WriteAllText("", ""); }