Head.SmackOnTable();

Contains Nuts.

Small Tip – Preprocessor Directives

without comments

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)

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • DotNetKicks
  • DZone

Written by Monty

October 10th, 2007 at 4:03 am

Posted in .NET

Leave a Reply