Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试将 VB6 代码转换为 c#,我在 VB6 中遇到了这段代码
#If ccDebug then ... End If.
请帮助我转换此代码或以任何其他方式执行此操作。
谢谢
if(ccDebug){ }
是等效的 C# 代码。
也许你需要使用
#if DEBUG //do special stuff #endif
如果我正确理解你的问题,几乎是一样的。
#if DEBUG .... #endif
有关详细信息,请参阅此MSDN 页面。
这只是一个项目范围内的常量,请参阅此站点以获取示例:
例子
你最好使用
#if DEBUG #endif