#define USE_METHOD_1 using System; using System.Diagnostics; class MainClass { [Conditional("USE_METHOD_1")] public static void Method1() { Console.WriteLine("In Method 1"); } public static void Main() { Console.WriteLine("In Main"); Method1(); } }
In Main In Method 1