Will the method described below overwrite the output file (process.txt)?
private static void CompareOrig() { File.WriteAllLines("process.txt", File.ReadAllLines("process2.txt").Except(File.ReadAllLines("process.txt"))); }
Information added:
The problem is that when the lines are read from the process2.txt file, they are written to the process.txt file and, therefore, overwrite all existing data in this file. Instead, how can I add output to process.txt? eg.
File.AppendAllText("process.txt")
James source share