📅  最后修改于: 2022-03-11 14:48:40.960000             🧑  作者: Mango
Process[] processlist = Process.GetProcesses();
foreach (Process theprocess in processlist)
{
Console.WriteLine("Process: {0} ID: {1}", theprocess.ProcessName, theprocess.Id);
}