c# - Is there a way to set the value of #define on runtime? -
i wonder if there way set value of #define in run time.
i assume there query oracle specific , sql server specific @ code below.
#define oracle // ... #if oracle // code #else // different code. #endif
absolutely not, #defines compiled out preprocessor before compiler sees - token 'oracle' isn't in code, '1' or '0'. change #define global variable or (better) function returns correct value.
Comments
Post a Comment