【发布时间】:2015-10-02 14:19:02
【问题描述】:
我正在关注一个没有源代码的复数网站教程,所以我写了
class Methods
{
public void MethodDemo()
{
WriteAsBytes(32);
}
public void WriteAsBytes(int p)
{
byte[] bytes = BitConverter.GetBytes(p);
foreach (byte b in bytes)
{
string message = String.Format("0x{0} ", b);
Debug.Write(message);
Console.Write("{0:X}", 0xffff);
Console.WriteLine("Hey look here " + message);
}
Debug.WriteLine(" space ");
Console.WriteLine(" ");
}
}
查看输出和调试/输出,我什么也没看到? 这是我第一次真正在 C# 中工作,所以这更像是一个视觉工作室问题,或者只是一个为什么 consoleWL 也是空白的问题?
我的输出是
The thread 0xb48 has exited with code 259 (0x103).
The thread 0x2ffc has exited with code 259 (0x103).
The program '[12864] Formating.vshost.exe: Program Trace' has exited with code 0 (0x0).
The program '[12864] Formating.vshost.exe' has exited with code 0 (0x0).
而且我不知道控制台在 WPF 应用程序中的位置。
【问题讨论】:
-
如果您在
Release模式下构建,则不会有任何调试输出。所以检查你的配置。
标签: c# wpf visual-studio methods