Like the tittle says, I would like to add a new string on the bottom of the file, but somehow, its not working.
Hope someone can help me out x___x
private string add(string asd){
{string filename = "asd.txt";
StreamReader reader = new StreamReader(filename);
StreamWriter write = new StreamWriter(filename);
string input = null;
while ((input = reader.ReadLine()) != null)
{
write.WriteLine(input);
}
reader.Close();
write.WriteLine(asd);
write.Close();}
Use
File.AppendAllText.Example: