Console.writeline()到输出窗口 [英] Console.writeline() to output window
本文介绍了Console.writeline()到输出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在Visual Studio 2008中运行Windows窗体应用程序.在编程时,我发现将一些简单的内容写入Visual Studio的输出窗口非常方便.但是突然之间,我使用Console.Writeline()写入输出窗口的内容不再出现在输出窗口中.
我使用Debug.WriteLine()编写的文本仍出现在输出窗口中.
有谁知道这个问题的原因是什么以及我该如何解决.
Grtz,
Wannes
Hi,
I,m running a windows form application in Visual Studio 2008. While programming I find it handy to write some simple things to the output window of visual studio. But suddenly the things I wrote to the output window using Console.Writeline() didn''t appear in the output window anymore.
Text that I write using Debug.WriteLine() still appear in the output window.
Does anyone know what can be the cause of this problem and how I can fix this.
Grtz,
Wannes
推荐答案
您应使用在名称空间System.Diagnostic
:
中定义的类Trace
.
You should use the classTrace
, defined inside the namespaceSystem.Diagnostic
:
System.Diagnostic.Trace.WriteLine(...);
我知道我可以/应该使用它.
但是,为什么Console.WriteLine()突然停止将文本发送到输出窗口?必须有一个解释.
grtz,
Wannes
I know that I could/should use that.
But why did Console.WriteLine() suddenly stopped sending the text to the output window? There must be an explanation.
grtz,
Wannes
这篇关于Console.writeline()到输出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文