Gets the friendly name of the process.
[Visual Basic] Public ReadOnly Property ProcessName As String [C#] public string ProcessName {get;} [C++] public: __property String* get_ProcessName(); [JScript] public function get ProcessName() : String;
The friendly name by which the process is identified by the user of the system.
Exception Type | Condition |
---|---|
SystemException | The process does not have an ID, or there is no process associated with the Process instance.
-or- The associated process has exited. |
The ProcessName is a friendly name for the process, without the .exe extension or the path, such as "Outlook". It is helpful for getting and manipulating all processes associated with the same executable. For example, you can call GetProcessesByName, passing in an executable name, in order to retrieve every running instance on the specified computer. You can use this array, for example, to shut down all running instances of the executable.
Process Class | Process Members | System.Diagnostics Namespace | GetProcessesByName