Is it possible to create a method which performs debugging assistance like the System.Diagnostics.Debug
class?
I'm looking for a way to construct a method which when called by an assembly compiled with the DEBUG conditional compilation symbol defined, results in an operation, and which is a no-op when called by an assembly without the symbol defined.
If possible, I'd like it to be possible for the calls to the debugging methods to add minimal overhead or increase in size to the release version of the assembly.
To clarify, the debugging methods should be in an assembly compiled in Release mode. Calls to the methods should only generate operations when called from an assembly with the DEBUG symbol defined in the scope of the method call.