c# write text file append and download code example Example: c# append text to file File.AppendAllText(@"c:\path\file.txt", "text content" + Environment.NewLine);