4
Reply

How can I delete all data in a text file

yokzu

yokzu

Jun 27 2011 2:28 AM
2k
Hello,
I'm using the code below for writing text in a text file.

StreamWriter dosya = new StreamWriter("mac.txt");
dosya.WriteLine("first line");
dosya.WriteLine("second line");
dosya.Close();

But I couldnt be able to find, how can I delete all data in this text file?

Answers (4)