Search results for 'Process Name'. 1 post(s) found.

  1. 2008/09/22 Finding process name on OS
2008/09/22 13:05

Finding process name on OS


Following function is very useful when checking currently working process based on name.

using System.Diagnostics;

.
.
.

public bool IsProcessOpen(string name)
{
    foreach (Process clsProcess in Process.GetProcesses) {
        if (clsProcess.ProcessName.Contains(name))
        {
            return true;
        }
    }
    return false;
}

Trackback 0 Comment 0

Trackback : Cannot send a trackbact to this post.