System.Diagnostics.DataReceivedEventArgs Class

Provides data for the Process.OutputDataReceived and Process.ErrorDataReceived events.

See Also: DataReceivedEventArgs Members

Syntax

public class DataReceivedEventArgs : EventArgs

Remarks

To asynchronously collect the redirected Process.StandardOutput or Process.StandardError stream output of a process, you must create a method that handles the redirected stream output events. The event-handler method is called when the process writes to the redirected stream. The event delegate calls your event handler with an instance of System.Diagnostics.DataReceivedEventArgs. The DataReceivedEventArgs.Data property contains the text line that the process wrote to the redirected stream.

Requirements

Namespace: System.Diagnostics
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0