Show / Hide Table of Contents

Method consoleProcess.Wait


Overload

Waits for more text and tells next consoleProcess.Read to get old + new text.

public bool Wait(int timeout = -1)
Parameters
timeout  (int)

Timeout, ms. The function returns false if did not receive more text during that time. If -1, returns true without waiting (next consoleProcess.Read will wait).

Returns
bool

true if received more text or if timeout is -1.

Exceptions
InvalidOperationException

consoleProcess.IsLine true. Or multiple Wait without Read.

Remarks

If returns true, next consoleProcess.Read will get the old text + new text. If the console process ends while waiting, next Read will get the old text, and consoleProcess.IsLine will be true.