【進程線程與同步】5.1 創建和銷毀子進程
using System.Diagnostics; using System.Threading; class Program { static void Main() { Process process = Process.Start("notepad.exe", "hello.txt"); //創建子進程,初始的進程為父進程 Thread.Sleep(1000);//父進程的線程在等待1秒後,銷毀子進程 process.Kill(); } }
最後更新:2017-04-03 16:59:42