System.Diagnostics.Process[] processes = System.Diagnostics.Process.GetProcessesByName("123");//进程名称不要加上.exeif (processes != null && processes.Length != 0){ return processes[0].Id;}
哦哦