-3
我还没有在C#中工作过一段时间,但我正在查看别人的代码,而他们在vaca上。一切运行良好本地,我仍然得到这个“无法到达的代码检测”错误,并且我想知道这个语句是否设置正确。如果/ endif在C#中检测到“无法到达的代码”
下面是一段代码:
private string GetRedirectUriForCurrentConfiguration() {
#if (DEBUG || DebugDev)
return "http://localhost:1855/";
#endif
return "http://172.16.40.39:1855";
}
private string GetAuthorityForCurrentConfiguration() {
#if (DebugDev)
return "http://172.16.40.32:44301/identity";
#endif
#if (DEBUG)
return "https://localhost:44301/identity";
#endif
我得到4号线的“无法访问”的消息,在return "http://172.16.40.39:1855";
我可能失去了一些东西超明显,但我只需要一些帮助看到它:/
在此先感谢!
它不是一个错误这是一个警告。 **如果**你处于调试模式'return“http://172.16.40.39:1855”;'将无法访问,这就是警告的内容。 –
在功能区栏上的Visual Studio中,您可以通过下拉菜单切换构建配置。 – aguertin