[ACCEPTED]-how to overwrite data in a txt file?-overwrite
Accepted answer
You need to change the second parameter 1 to false:
using (StreamWriter newTask = new StreamWriter("test.txt", false)){
newTask.WriteLine(name[i].ToString());
}
You're passing true
as the append
parameter.
0
Source:
stackoverflow.com
More Related questions
Cookie Warning
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.