Conditional Compilation in VB.Net
So I'm browsing the MSDN library, like one does of an afternoon, and I see the section on #If...Then...#Else Directives. Apparently it existed in the vb6 days, too, but I somehow missed this one. It obviously functions similarly to a regular If .. Then .. Else in terms of conditional logic but the difference is that it is a compile-time directive. What this means is that you can actually compile different physical versions of your product based on different conditions (e.g. debug vs. release).
[update: Rocky Lhotka put up a nice post recently about A scary way to do conditional compilation - an interesting read]