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.
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).
Scott has mentioned on his blog that Enterprise Library should be available for download by this afternoon. He will post links on his blog site when it becomes available. He also mentions that in order to download you will have to register. He states they would like to get an idea of the people who are downloading the bits. Hopefully the registration process won’t be too drawn out.
While you’re waiting for the download to be available you can still check out the GotDotNet space where the docs have been posted.