Initializes a new instance of the System.Diagnostics.Process.Process class.
[Visual Basic] Public Sub New() [C#] public Process(); [C++] public: Process(); [JScript] public function Process();
You have two options when associating a new Process component with a process resource. You can use the constructor to explicitly create the Process component yourself, set the appropriate members of the StartInfo property and then call Start to associate the Process with a new system process, or you can associate the Process with a running system process using GetProcessById or one of the GetProcesses return values.
If you use a static (in Visual Basic Shared) overload of the Start method to start a new system process, a new Process component is created for you and automatically associated with the process.
Both options provide similar functionality to the Run dialog box of the Windows Start menu. Anything that can be typed into a command line can be launched by setting appropriate values for the StartInfo and calling the parameterless Start method, or passing the appropriate parameter into the static (Shared) Start member.
Once you have created a Process component, either through the constructor or through one of the static Start overloads, you have a view into the associated process. This is not a dynamic view that updates itself automatically when the process properties have changed in memory. Instead, you must call Refresh on the component to update Process property information in your application.
Process Class | Process Members | System.Diagnostics Namespace