Creates an array of new Process components, associating them with existing process resources on the specified computer.
Creates a new Process component for each process resource on the specified computer.
[Visual Basic] Overloads Public Shared Function GetProcesses(String) As Process ()
[C#] public static Process[] GetProcesses(String);
[C++] public: static Process* GetProcesses(String*) [];
[JScript] public static function GetProcesses(String) : Process[];
Creates a new Process component for each process resource on the local computer.
[Visual Basic] Overloads Public Shared Function GetProcesses() As Process ()
[C#] public static Process[] GetProcesses();
[C++] public: static Process* GetProcesses() [];
[JScript] public static function GetProcesses() : Process[];
We use Notepad and Internet Explorer because they open separate instances of the application in separate windows. Some applications, like Word, can open multiple instances in the same window and hence the same process.
It is most demonstrative to open multiple instances of Notepad and Internet Explorer before executing the code.
Process Class | Process Members | System.Diagnostics Namespace