System.Diagnostics.ProcessStartInfo.RedirectStandardInput Property

Gets or sets a value indicating whether the input for an application is read from the Process.StandardInput stream.

Syntax

[System.ComponentModel.DefaultValue(false)]
[System.ComponentModel.NotifyParentProperty(true)]
[System.Diagnostics.MonitoringDescription("Standard input of this process is redirected.")]
public bool RedirectStandardInput { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

A System.Diagnostics.Process can read input text from its standard input stream, typically the keyboard. By redirecting the Process.StandardInput stream, you can programmatically specify the input of a process. For example, instead of using keyboard input, you can provide text from the contents of a designated file or output from another application.

Note:

You must set ProcessStartInfo.UseShellExecute to false if you want to set ProcessStartInfo.RedirectStandardInput to true. Otherwise, writing to the Process.StandardInput stream throws an exception.

Requirements

Namespace: System.Diagnostics
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0