UtilProcessKillProcess Method

Kills the first ocurrence found of a running process with the specified name.

Definition

Namespace: DevCase.Core.Diagnostics.Processes
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static bool KillProcess(
	string processName,
	bool killChildProcesses = false,
	bool throwOnProcessNotFound = false
)

Parameters

processName  String
The process name.
killChildProcesses  Boolean  (Optional)
If , also kills any child process of the found process.
throwOnProcessNotFound  Boolean  (Optional)
If , throws an ArgumentException exception if any process was found with the specified name.

Return Value

Boolean
if successful ; if failed or if throwOnProcessNotFound is and any process was found with the specified name.

Exceptions

ArgumentException Any process found with the specified name.;processName

See Also