You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enter some text: test
Peek: 116 ReadLine: test
Enter some text: test
Peek: -1 ReadLine: test
Enter some text: test
Peek: -1 ReadLine: test
Essentially it is impossible to use Console.In.Peek() after the first line has been consumed. Note that this behaviour manifests itself regardless of whether the buffer contains any characters. The following variant will produce the exact same observable behaviour:
eiriktsarpalis
changed the title
Console.In.Peek() always returning EOF after the first read line
Console.In.Peek() always returning EOF after the first read line on Windows
Aug 12, 2020
I came across the following behaviour when debugging a System.Console test. Running
Produces the following behaviour
Essentially it is impossible to use
Console.In.Peek()
after the first line has been consumed. Note that this behaviour manifests itself regardless of whether the buffer contains any characters. The following variant will produce the exact same observable behaviour:Note that unix does not have the same behaviour.
The text was updated successfully, but these errors were encountered: