I want to open a text file, append a single line to it, then close it.
You can use File.AppendAllText for that:
File.AppendAllText
File.AppendAllText(@"c:pathfile.txt", "text content" + Environment.NewLine);
1.4m articles
1.4m replys
5 comments
57.0k users