using (var process = Process.Start("notepad.exe")) { Console.WriteLine("Process Id = {0}", process.Id); }