Append

verb

say it: “uh-PEND” /əˈpɛnd/

To add to the end of a file, keeping what is already there.

What is Append in C#?

Append — Writing to the end of a file and keeping everything already in it, instead of replacing it. Logs are appended to: each run adds new lines under the old ones.

File.AppendAllText("orders.log", "Order 43 shipped" + Environment.NewLine);
using StreamWriter log = new("orders.log", append: true);

In a sentence

  • “Each run of the program appends a line to orders.log.”

Level: Apprentice · More C# terms at this level

Updated