Global conditional define (#const) statements in vb.net
Is there a way to define a conditional define, i.e. #const, in a asp/vb.net app that it accessible across multiple source files?
I want to use, for example开发者_如何学Python,
#const useOracle=TRUE
but to be able to change it's value in only one place.
Thanks for any advice.
You can do this in the project properties (right-click the project in the Solution Explorer, select "Properties"), in the "Compile" tab. Click the "Advanced Compiler Options" button, and enter your constants into the "Custom constants" text box.
精彩评论