#define AAA #define BBB using System; class MainClass { public static void Main() { #if AAA Console.WriteLine("Compiled for AAA version."); #endif #if AAA && BBB Console.Error.WriteLine("Testing AAA and BBB version."); #endif Console.WriteLine("This is in all versions."); } }
Compiled for AAA version. Testing AAA and BBB version. This is in all versions.