C#: Check if an application is already running

This is the snippet code to check if application running or not in C#

using System.Diagnostics;
bool IsApplicationAlreadyRunning(string processName)
{
Process[] processes = Process.GetProcessesByName(processName);
if (processes.Length >= 1)
return true;
else
return false;
}


By
NOTE : – If You have Found this post Helpful, I will appreciate if you can Share it on Facebook, Twitter and Other Social Media Sites. Thanks =)

Popular posts from this blog

How to create zip file to download in JSP- Servlet

How to create DataGrid or GridView in JSP - Servlet

Pinging in ASP.NET Example