Allowing redirection of StandardInput of a C# application when doing “Console.ReadKey”
问题 I have 2 applications, A & B. A calls B within a Process. B do some stuffs like Console.WriteLine and Console.ReadLine Thanks to this MSDN Article, I manage somehow to redirect the output of B and to feed its input as well. What I don't manage to do , is to have the Console.ReadKey function in B work. I made a try catch block arround this function and I got this error message: Cannot read keys when either application does not have a console, or when console input has been redirected from a