yokzu

yokzu

  • NA
  • 306
  • 0

How can I delete all data in a text file

Jun 27 2011 2:28 AM
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)