Process.ProcessName : Process « System.Diagnostics « C# / C Sharp by API






Process.ProcessName

 

using System;
using System.Diagnostics;

class MainClass
{
  static void Main(string[] args)
  {
    Process[] runningProcs = Process.GetProcesses(".");
    foreach(Process p in runningProcs)
    {
      string info = string.Format("-> PID: {0}\tName: {1}",p.Id, p.ProcessName);        
      Console.WriteLine(info);
    }
  }
}

   
  








Related examples in the same category

1.Process.CloseMainWindow
2.Process.Exited
3.Process.GetCurrentProcess()
4.Process.GetProcessById
5.Process.Kill()
6.Process.Modules
7.Process.PeakWorkingSet64
8.Process.PriorityClass
9.Process.PrivateMemorySize
10.Process.StandardOutput.ReadToEnd()
11.Process.Start
12.Process.StartInfo.RedirectStandardOutput
13.Process.Threads
14.Process.TotalProcessorTime
15.Process.VirtualMemorySize
16.Process.WaitForExit
17.Process.WorkingSet