标签: asp.net
你能让我知道用于C / C ++ #define的asp.net等价物吗?感谢
答案 0 :(得分:5)
C#有#define用于条件编译,但只能定义(或不定义);没有其他价值。对于常数,您只需根据需要使用const或readonly。
答案 1 :(得分:0)
一般const - 请参阅类似问题:http://bytes.com/topic/c-sharp/answers/224517-c-equivalent-cs-define
const