开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜