开发者

How to create multiple preprocessor constants in ASP.NET Page Directive?

开发者 https://www.devze.com 2022-12-22 10:31 出处:网络
It is possible to create a constant like this: http://haacked.com/开发者_运维技巧archive/2007/09/16/conditional-compilation-constants-and-asp.net.aspx

It is possible to create a constant like this:

http://haacked.com/开发者_运维技巧archive/2007/09/16/conditional-compilation-constants-and-asp.net.aspx

<%@ Page CompilerOptions="/d:QUUX" %>

How to create multiple constants ?


This is equivalent to the Csc.exe /define: (or vbc.exe if you're using VB, I don't discriminate!) The /d: is just short for /define: in either case.

To add multiple constants, just slap a comma in there:

<%@ Page CompilerOptions="/d:QUUX,QUUX2,BOB,LITTLETIMMY,MYFOOTHURTS" %>
0

精彩评论

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