Redirecting stdin and stdout in .Net

后端 未结 3 1069
逝去的感伤
逝去的感伤 2021-01-03 01:01

I\'m trying to redirect stdin and stdout of a console application, so that I can interact with them via F#. However, depending on the console application the obvious code se

3条回答
  •  走了就别回头了
    2021-01-03 01:16

    I'll bet neither python nor fsi are actually generating a line of text to be read. The call to ReadLine will block until a full line ending with a carriage return or linefeed is available.

    Try reading a character at a time (with Read instead of ReadLine) and see what happens.

提交回复
热议问题