using System; using System.Diagnostics; using System.ComponentModel; class MyProcess { static void Main() { Process currentProcess = Process.GetCurrentProcess(); Process [] localByName = Process.GetProcessesByName("notepad"); } }