What is the Purpose of Console.WriteLine() in Winforms

前端 未结 4 1390
终归单人心
终归单人心 2021-02-08 11:12

I once saw the source code of a winform application and the code had a Console.WriteLine();. I asked the reason for that and i was told that it was for

4条回答
  •  猫巷女王i
    2021-02-08 11:52

    You wouldn't really use it normally but if you've attached a Console or use AllocConsole, it will function like in any other console application and the output will be visible there.

    For quick debugging, I prefer Debug.WriteLine but for a more robust solution, the Trace class may be preferable.

提交回复
热议问题