debug = true时使用方法参数的任何方法
当调试= true时,使用方法参数的任何方法,例如条件上的tribute,但对于参数:
static void Recursion(int depth)
{
//.. some code here
// .. Recursion(depth); ..
}
对于我的情况,我需要类似的东西:
Recursion([ConditionalParameter("DEBUG")] int depth)
Any way to use method parameter when DEBUG=true, like ConditionalAttribute but for parameter:
static void Recursion(int depth)
{
//.. some code here
// .. Recursion(depth); ..
}
For my case I need something like:
Recursion([ConditionalParameter("DEBUG")] int depth)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为您应该使用
debugger.isattached
与语句结合使用:I think you should use
Debugger.IsAttached
in combination with anif
statement:您可以做:
但是我不建议这样做。
You could do:
But I wouldn't recommend it.