Detecting Process Completion : Process : Development Class C# Source Code


Custom Search

C# Source Code » Development Class » Process »

 

Detecting Process Completion









    

using System;
using System.Diagnostics;

public class DetectingProcessCompletion
{
    static void ProcessDone(object sender, EventArgs e)
    {
        Console.WriteLine("Process Exited");
    }
    
    public static void Main()
    {
        Process p = new Process();
        p.StartInfo.FileName = "notepad.exe";
        p.StartInfo.Arguments = "process3.cs";
        p.EnableRaisingEvents = true;
        p.Exited += new EventHandler(ProcessDone);
        p.Start();
        p.WaitForExit();
        Console.WriteLine("Back from WaitForExit()");
    }
}
           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Development Class
» Process