Where does Console.WriteLine go in Debug?

后端 未结 10 2129
后悔当初
后悔当初 2020-12-15 16:23

I found this question, but what I want to know is different - does the output from Console.WriteLine go anywhere when debugging? I know that for it to go to the output windo

10条回答
  •  执笔经年
    2020-12-15 17:30

    Debug and Release do not control whether or not you get a console window. That is controlled by the project's output type. (Properties -> Application -> Output Type). Console Application will get you a console window which will visualize and receive input from the window into the Error, In, and Out streams in System.Console.

    The System.Console class exposes several properties and methods for interacting with its streams even if you cannot see it. Most notably: Error, In, Out, SetError(), SetIn(), SetOut(), and the Read and Write methods.

提交回复
热议问题