precompile marco: define, undef, elif, endif
#define MYOWN
#define DEBUG
#undef VERBOSE
using System;
class Operators {
static void Main() {
#if MYOWN
Console.WriteLine("Hi!");
#elif VERBOSE
Console.WriteLine("Program Starting?);
#endif
int a = 10, b = 5;
#if DEBUG
Console.WriteLine("a={0}, b={1}", a, b);
#endif
#if MYOWN && (VERBOSE || DEBUG)
Console.WriteLine("Continuing, Author");
#elif !MYOWN && (VERBOSE || DEBUG)
Console.WriteLine("Continuing?);
#endif
}
}
Related examples in the same category