阅读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驱动