C#获取系统当前进程,废话不多说,贴代码: vip视频解析
- using System.Diagnostics;
- //...
- Process[] ps = Process.GetProcesses();
- foreach(Process p in ps){
- string info = "";
- try
- {
- info = p.Id + " " + p.ProcessName + " " + p.MainWindowTitle + " " + p.StartTime;
- }catch(Exception e){
- info = e.Message;
- }
- Console.WriteLine(info);
- }
- Console.Read();
运行效果如下图: 视频解析