C# Compiler Directives

Posted by pm_2 on Stack Overflow See other posts from Stack Overflow or by pm_2
Published on 2010-05-27T10:21:38Z Indexed on 2010/05/27 10:31 UTC
Read the original article Hit count: 221

Filed under:
|

I’m looking at some C# code, and have come across the following statement:

#if DEBUG
    // Do something here
#else
    // Do something else
#endif

I assumed that DEBUG would be a defined somewhere as follows:

#define DEBUG

But I’m unable to find such a definition, although the code seems to behave as though it were set. Is DEBUG a special case, and if so, how is it set / unset?

© Stack Overflow or respective owner

Related posts about c#

Related posts about compiler-directives