📜  如何获取进程列表c#代码示例

📅  最后修改于: 2022-03-11 14:48:40.960000             🧑  作者: Mango

代码示例1
Process[] processlist = Process.GetProcesses();

foreach (Process theprocess in processlist)
{
    Console.WriteLine("Process: {0} ID: {1}", theprocess.ProcessName, theprocess.Id);
}