标签:ar art 代码 sp ef c file c# bs
c#不支持宏定义,只支持编译开关。
======================================
我想加上#define xxx就编译a代码,否则编译b代码,像这样的:
#if xxx
a
#else
b
#endif
============================================
//#define Timing
#define Channel
上面两个,任意选一个,就说明开关打开了
#if Timing [#define Timing]
phy.StartInfo.FileName = "DrawTiming.exe";
#elif Channel
phy.StartInfo.FileName = "DrawChannel.exe";
#else
phy.StartInfo.FileName = "DrawPhysical.exe";
#endif
标签:ar art 代码 sp ef c file c# bs
原文地址:http://www.cnblogs.com/chucklu/p/3934458.html