Nen*_*lep 40 c# asp.net web-config
在编译期间,我可以做一个检查
#if DEBUG
Log("something");
#endif
Run Code Online (Sandbox Code Playgroud)
但是debug="false",在运行时期间检查是否在Web.config中设置是首选的是什么?
Bri*_*ton 72
HttpContext.IsDebuggingEnabled
http://msdn.microsoft.com/en-us/library/system.web.httpcontext.isdebuggingenabled.aspx
Vas*_*liy 50
在某些情况下,您可能需要HttpContext.Current.IsDebuggingEnabled(有点明显,但仍然如此)
| 归档时间: |
|
| 查看次数: |
20242 次 |
| 最近记录: |