Answers for "streamreader overwrites my textfile but i want to update"

0

streamreader overwrites my textfile but i want to update

string file = File.ReadAllText(@".\path\to\file.txt");
file = file + "Some string I'm adding to my file";
File.WriteAllText(@".\path\to\file.txt", file); // note this overwrites the file
Posted by: Guest on December-01-2020

Code answers related to "streamreader overwrites my textfile but i want to update"

Browse Popular Code Answers by Language