#Define Compiler Directive in C#
Posted
by pm_2
on Stack Overflow
See other posts from Stack Overflow
or by pm_2
Published on 2010-06-10T08:10:50Z
Indexed on
2010/06/10
8:22 UTC
Read the original article
Hit count: 197
In C, I could declare a compiler directive as follows:
#define MY_NUMBER 10
However, in C#, I only appear to be able to do this:
#define MY_NUMBER
Which is obviously useless in this case.
Is this correct, or am I doing something wrong? If not, can anyone suggest a way of doing this, either at namespace or solution level? I thought of maybe creating a static class, but that seems to be overkill for one value.
© Stack Overflow or respective owner