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

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

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -