Process Already Running 

Posted by Ron Rechtman Wednesday, March 24, 2010 11:45:38 PM

 So you want to know if a process is running...

using System.Diagnostics;

 

 

public static bool IsProcessAlreadyRunning()
{
    Process currentProcess = Process.GetCurrentProcess();
     List<Process> processes = Process.GetProcesses().Where(x=>x.ProcessName == currentProcess.ProcessName).ToList<Process>();
     return (processes.Count > 1);
}

 

Enjoy!

 

Share This Using Popular Bookmarking Services
You must sign in to this site to post comments.
Site Map | Printable View | © 2008 - 2010 NuRoN Consulting, INC | Powered by mojoPortal | XHTML 1.0 | CSS | Original design by Andreas Viklund | Designed by NuRoN Consulting, INC.
Share This Using Popular Bookmarking Services