UtilProcessForEachProcessByName Method

Performs an action on all the Process objects found of running processes 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 void ForEachProcessByName(
	string processName,
	Action<Process> predicate,
	bool throwOnProcessNotFound = false
)

Parameters

processName  String
The process name.
predicate  ActionProcess
A transform function to apply to each process found.
throwOnProcessNotFound  Boolean  (Optional)
If , throws an ArgumentException exception if any process was found with the specified name.

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

Exceptions

ArgumentException No processes found with the specified name.;processName

See Also