- using System;
- using System.IO;
- namespace forgetCode
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Please enter the content to append in to the file - type exit and press enter to finish editing:");
- string newContent = Console.ReadLine();
- while (newContent != "exit")
- {
- File.AppendAllText("D:\\test.txt", newContent);
- newContent = Console.ReadLine();
- }
- }
- }
- }