此文记录的是进程操作的类库。
/*** 进程工具类 Austin Liu 刘恒辉 Project Manager and Software Designer E-Mail: [email protected] Blog: http://lzhdim.cnblogs.com Date: 2024-01-15 15:18:00 使用方法例子: foreach (string filePath in list) { ProcessExitUtil.IsProcessExit(filePath); } ***/ namespace Lzhdim.LPF.Utility { using System.Diagnostics; /// <summary> /// 进程工具类 /// </summary> public class ProcessExitUtil { /// <summary> /// 运行并判断进程是否退出 /// </summary> /// <param name="appFilePath"></param> /// <returns></returns> public static bool IsProcessExit(string appFilePath) { // 启动应用 Process process = Process.Start(appFilePath); if (process != null) { // 等待应用退出 process.WaitForExit(); return true; } else { return false; } } } }
标签:函数,filePath,C#,process,ProcessExitUtil,进程,工具 From: https://www.cnblogs.com/lzhdim/p/18340711