I am constantly switching to console mode from windows application mode when debugging. If my application is in Windows mode, will Console.Read and Console.ReadLine wait for user input?
I am constantly switching to console mode from windows application mode when debugging. If
Share
In a Windows Application,
Console.Readwill always return -1,Console.ReadLinewill returnnull,ReadToEndwill returnstring.Empty, andPeekwill return-1;This is because the
Consoleclass will automatically install a customStreamReadertoConsole.Inso these calls avoid being problematic.