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