【进程线程与同步】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();
    }
}

posted @ 2013-06-23 17:41  清山博客  阅读(295)  评论(0编辑  收藏  举报