C#预处理器指令——学习

 

若要详细了解如何使用 C# 预处理器指令选择性地编译代码段,请参阅 #define(C# 参考)#if(C# 参考)

#define(C# 参考)

地址:https://docs.microsoft.com/zh-cn/dotnet/csharp/language-reference/preprocessor-directives/preprocessor-define

#if(C# 参考)

地址:https://docs.microsoft.com/zh-cn/dotnet/csharp/language-reference/preprocessor-directives/preprocessor-if

需要学习这方面的知识。

文章:C# 预处理器指令

记录时间:20190917

 --------------------

改代码只会在调试模式下运行

 #if DEBUG Console.WriteLine("Debug version"); #endif

 

相关文章