VS2013 - Specific action for a few configs

本小妞迷上赌 提交于 2020-01-06 19:51:40

问题


Here is a question i asked earlier, that can explain what i am looking for:

The question with help you understand the problem is here

What will be better?

#if (!DEBUG || !DEBUG1 || !DEBUG2 || !DEBUG3) 
variable=5; #endif

or

if( !System.Diagnostics.Debugger.IsAttached )
{
  //code which should only run if not being debugged
}

If I want to attach this specific action to my 4 configs, should i use first option or the second will also be good, because System.Diagnostics.Debugger.IsAttached will fit to each of my configs?

来源:https://stackoverflow.com/questions/31672734/vs2013-specific-action-for-a-few-configs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!