我曾经看到一个的winform 应用程序的源代码,该代码有一个 Console.WriteLine(); 。我问其中的原因,我被告知,这是用于调试目的
PLS是什么精华Console.WriteLine(); 在的winform 和它进行什么动作,因为当我尝试使用它,它从来没有写过任何东西。
解决方案它写入到控制台。
最终用户将无法看到它,说实话它的干净得多将其放到一个适当的日志,但如果通过VS运行控制台窗口将填充。
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 debugging purposes.
Pls what is the essence of Console.WriteLine(); in a winform and what action does it perform because when i tried using it, it never wrote anything.
解决方案It writes to the Console.
The end user won't see it, and to be honest its much cleaner to put it into a proper log, but if you run it through VS the Console window will populate.
更多推荐
什么是Console.WriteLine()中的WinForms的目的
发布评论