C# !Conditional attribute?
Does C# have a not Conditional ( !Conditional , NotConditional , Conditional(!) ) attribute? i know C# has a Conditional attribute : [Conditional("ShowDebugString")] public static void ShowDebugString(string s) { ... } which is equivalent 1 to: public static void ShowDebugString(string s) { #if ShowDebugString ... #endif } But in this case i want the inverse behavior (you have to specifically opt out ): public static void ShowDebugString(string s) { #if !RemoveSDS ... #endif } Which leads me to try: [!Conditional("RemoveSDS")] public static void ShowDebugString(string s) { ... } which doesn't