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