❔ Suppressing CS0162 for a specific constant
I got a constant that wraps the type of compilation the application is (Debug, Testing, Release).
The value is defined using #if DEBUG. The main reason being to not actually compile the code that isnt fully developed yet and just keep everything a little bit smaller in size.
Is there any way to suppress the resulting CS0162 (Unreachable code) somehow, since the SuppressWarning-Attribute does not support Compilerwarnings?
3 Replies
#pragma warning disable
The ide will offer to do this for you
Though I'm not really sure what in your description would trigger unreachable code
Probably something like
Instead of
#else
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.