I have code which I would like to enable for compilation when I build project using Release configuration and disable while debugging. How to do what?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use a preprocessor directive.
Though, if your code is full of these, you may want to consider other options, such as
Another alternative is to use the
ConditionalAttributeon a method so it will only be used if a specific symbol has been defined: