var timer = new Timer
{
Enabled = true,
Interval = 500
};
Debug.WriteLine("new timer created");
timer.Elapsed += (s, e) =>
{
Debug.WriteLine("hello from timer");
// this doesn't get shown
// in the output window
}
我需要做什么才能在上面的输出窗口中看到我最后的Debug.WriteLine()
?Debug.WriteLine不适用于不同的线程
@ColeJohnson:No.1)标准输出是过程全局。 2)这不是标准输出。 – SLaks
您是否有其他Debug.WriteLine消息出现在输出窗口中? – Gusdor
@Gusdor你的意思是除了第一个? – Johan