if (System.Diagnostics.Process.GetProcessesByName("程序進程中的名稱").ToList().Count > 0)
{
//存在
}
else
{
//不存在