(Console.BufferHeight) I can't see/scroll to see all the console output with Console.WriteLine

后端 未结 5 857
灰色年华
灰色年华 2020-12-20 14:25

When I run this code, the number at the top of the output window is 99701. Why don\'t I get to see all the way through 1? I actually see all the numbers getting outputted, b

5条回答
  •  温柔的废话
    2020-12-20 14:52

    This has nothing to do with C#, but actually the output buffer in the command prompt is only 300 lines long by default. You can change that in the window settings, although maybe this is an opportunity to try implementing a "more" like feature, which breaks out of the loop every time a screenful of data is output. Then when you press a key, it outputs another screenful, etc.

提交回复
热议问题