Small Tip - Preprocessor Directives

Some people say that using preprocessor directives is just plain evil in c#.net, but it has uses. For example, the #warning and the #error directives will generate a warning and / or an error when used, like so:

C:\Work\SVN\xxx\xxx\xxx\xxx.cs(67,10): warning CS1030: #warning: 'REMOVE ME BEFORE GO LIVE'

Quite useful as a reminder...and you can replace that with an error if you want to make sure something dosent compile, until you have finished the code (useful for working over weekends, in my opinion at least)

Leave a comment

Please be polite and on topic. Your e-mail will never be published.

Please add 2 and 1 and type the answer here: