线程合并

代码一:

     Process process = Process.Start("notepad++.exe", @"D:File.txt");
            Thread.Sleep(6000);
            process.Kill();

解释: 用 notepad++ 打开 File.txt 文件;

线程合并:

1,  自己提前打开 notepad++, 

2,运行程序,    程序运行的 notepad++ 线程 会被  提前打开的 notpad++线程合并

3, 执行到 process.kill() 的时候 ,因为 程序打开的线程 被合并 所以 报错;

4 , 错误提示:进程已退出,因此无法处理请求。

原文地址:https://www.cnblogs.com/sunzhenyong/p/4600412.html