I have an ASP.NET web application and I have some code that I want to execute only in the debug version. How to do this?
#if DEBUG your code #endif
You could also add ConditionalAttribute to method that is to be executed only when you build it in debug mode:
[Conditional("DEBUG")] void SomeMethod() { }
1.4m articles
1.4m replys
5 comments
57.0k users