Occurs when an application writes to its redirected Process.StandardError stream.
The Process.ErrorDataReceived event indicates that the associated process has written to its redirected Process.StandardError stream.
The event only occurs during asynchronous read operations on Process.StandardError. To start asynchronous read operations, you must redirect the Process.StandardError stream of a System.Diagnostics.Process, add your event handler to the Process.ErrorDataReceived event, and call Process.BeginErrorReadLine. Thereafter, the Process.ErrorDataReceived event signals each time the process writes a line to the redirected Process.StandardError stream, until the process exits or calls Process.CancelErrorRead.
The application that is processing the asynchronous output should call the Process.WaitForExit method to ensure that the output buffer has been flushed.