4
Answers

How can I delete all data in a text file

yokzu

yokzu

13y
2.1k
1
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)