閱讀34 返回首頁    go 阿裏雲 go 技術社區[雲棲]


【進程線程與同步】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

  上一篇:go FPGA/CPLD簡介
  下一篇:go windows qt 編譯 oracle11g驅動