CSharp examples for Language Basics:Preprocessor
The #define preprocessor directive creates symbolic constants.
#define PI/*from w ww.j av a 2s . co m*/ using System; class Program { static void Main(string[] args) { #if (PI) Console.WriteLine("PI is defined"); #else Console.WriteLine("PI is not defined"); #endif Console.ReadKey(); } }