Process.ReadAllBytes(Nullable<TimeSpan>) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Reads all standard output and standard error of the process as byte arrays.
public(byte[] StandardOutput, byte[] StandardError) ReadAllBytes(TimeSpan? timeout = default);
member this.ReadAllBytes : Nullable<TimeSpan> -> ValueTuple<byte[], byte[]>
Public Function ReadAllBytes (Optional timeout As Nullable(Of TimeSpan) = Nothing) As ValueTuple(Of Byte(), Byte())
Parameters
The maximum amount of time to wait for the streams to be fully read. When null, waits indefinitely.
Returns
A tuple containing the standard output and standard error bytes.
Exceptions
timeout, truncated to a whole number of milliseconds, is less than -1 or greater than MaxValue.
Standard output or standard error has not been redirected.
-or-
A redirected stream has already been used for synchronous or asynchronous reading.
The operation did not complete within the specified timeout.
The process has been disposed.