I came across this about two years ago when I was putting together a presentation on debugging in .Net. It came up again last week, so I thought I would share on here.
If the WriteLineIf and WriteIf methods of the Trace and Debug classes are provided a method for the value or category parameter, it is executed even if the condition is false. For example, the following code will produce a console with the text “GetErrorMessage is run“ printed three times, even though the condition for the WriteLineIf statement is 1==0, which is false.
The good news is that I have the Media Center Extender working now. The bad news is that it took a new computer to do it. My wife and I had agreed to update our computer which was about two years old. I’ve upgraded to a P4, 3.20 GHz from Dell (Dimension 8400) with a Gig of RAM. I ordered it with Media Center Edition as the OS. The computer works great, and so does the extender.
If your machine is taking a bit to load the MSDN Library application then try this little gem:
Open up the MSDN Library application (notice how long it takes to load). Click on the Tools Menu | Options. Select the “Web Browser“ option on the listbox. For the Home Page setting, remove the “Use default“ check box and type “about:blank“ in the textbox. (no quotes) Click OK. Close the library application and reopen it (to see how much quicker the app loads).