You should probably take a good look at the System.Diagnostics.Debug class and how it is implemented using the Conditonal attribute.
Build something like that. Ease of use is nothing against the complexity of being sure that you have all disabled it.
And, of course, C # has no glbal variables.
source share