c#判断程序是否正在运行 if (System.Diagnostics.Process.GetProcessesByName("程序进程中的名称").ToList().Count > 0) { //存在 } else { //不存在