Fan.Sys.LocalFile.handleProcessExit C# (CSharp) Méthode

handleProcessExit() static private méthode

static private handleProcessExit ( object sender, System args ) : void
sender object
args System
Résultat void
        static void handleProcessExit(object sender, System.EventArgs args)
        {
            foreach (FileSystemInfo f in m_deleteOnExit)
              {
            try
            {
              if (f is DirectoryInfo)
            (f as DirectoryInfo).Delete(true);
              else
            f.Delete();
            }
            catch (System.IO.DirectoryNotFoundException) {}  // ok
            catch (System.IO.FileNotFoundException) {}       // ok
              }
        }