https://blog.csdn.net/qq_37664403/article/details/118747195

 

1.Debug模式,Release模式
#if DEBUG
Console.WriteLine(“Debug模式”);
#else
Console.WriteLine(“Release模式”);
#endif
此方法适合习惯好的程序员,但是对我来说不怎么习惯使用,因为调试个代码,和不在调试情况下运行 我不会去切换Release模式

2.vs调试模式=开发模式,发布模式=编译后直接打开软件模式
if (Debugger.IsAttached)
{
MessageBox.Show(“调试模式已开启”);
}
else
{
MessageBox.Show(“发布模式已开启”);
}
————————————————
版权声明:本文为CSDN博主「名伟」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_37664403/article/details/118747195

相关文章:

  • 2021-04-18
  • 2021-05-22
  • 2021-09-26
  • 2021-12-21
  • 2022-12-23
  • 2021-10-18
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-12
  • 2022-01-05
  • 2022-01-17
  • 2021-06-11
相关资源
相似解决方案