111,083
社区成员




using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Process.Start("f1.exe");
//if(判断此进程结束)???
//{ Process.Start("f2.exe"); }
}
}
}
Process myProcess = Process.Start("f1.exe");
System.Diagnostics.Process[] p_arry = System.Diagnostics.Process.GetProcesses();
for (int i = 0; i < p_arry.Length; i++)
{
if (!myProcess.HasExited)
{
Process.Start("f2.exe");
}
}
System.Diagnostics.Process[] p_array = System.Diagnostics.Process.GetProcesses();
foreach (Process cess in p_array)
{
Console.Write(cess.ProcessName+"\n");
Console.Write(cess.HasExited + "\n");
}
Console.ReadLine();
bool ISover=false;
System.Diagnostics.Process[] p_arry = System.Diagnostics.Process.GetProcesses();
for (int i = 0; i < p_arry.Length; i++)
{
if (p_arry[i].ProcessName.ToLower() == "f1")
{
ISover=true;
}
}
if(ISover==true)
{
Process.Start("*********");
}