正如标题所说,我想在文件底部添加一个新字符串,但不知何故,它不起作用。希望有人可以帮助我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();}