Esempio n. 1
0
 private void ScheduleFileDelete(string file)
 {
     Finalizer.ScheduleFinalization(() =>
     {
         if (!File.Exists(file))
         {
             return;
         }
         try
         {
             File.Delete(file);
             Console.WriteLine(@"Configuration file {0} was deleted.", file);
         }
         catch
         {
             Console.WriteLine(@"Cannot delete configuration file {0}!", file);
         }
     });
 }