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

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -