コード例 #1
0
 public static void WriteAllLinesWithBackup(string path, IEnumerable <string> contents)
 {
     BackupUtil.BackupFile(path);
     File.WriteAllLines(path, contents);
 }
コード例 #2
0
 public static void WriteAllTextWithBackup(string path, string contents)
 {
     BackupUtil.BackupFile(path);
     File.WriteAllText(path, contents);
 }