C# !Conditional attribute?
First, having the Conditional attribute is not equivalent to having #if inside the method. Consider: ShowDebugString(MethodThatTakesAges()); With the real behaviour of ConditionalAttribute, MethodThatTakesAges doesn’t get called – the entire call including argument evaluation is removed from the compiler. Of course the other point is that it depends on the compile-time preprocessor symbols at the compile … Read more