监视列表中的异常行为 [英] strange behavior in watch list

查看:84
本文介绍了监视列表中的异常行为的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

监视列表中出现了我无法解释的行为.在检查监视列表中的对象时,其值列为'VariableName'"未声明.由于其保护级别,它可能无法访问."这是断断续续的 声明并初始化之后.例如:

I'm getting a behavior in the watch list that I can't explain. While examining an object in the watch list, its value collumn reads "'VariableName' is not declared. It may be inaccessible due to its protection level." This is from a break point after it has been declared and initialized. For example:

将其作为新列表()

-这里的断点----

-- break point here ----

起初,我的自定义对象虽然存在问题,但是任何框架对象和所有框架对象都存在相同的问题.它不使用值对象执行此操作,但是如果在类对象之后声明了值对象,则会遇到相同的错误.我试过 重新启动后,我无法恢复到正常状态.这可能是VS2010错误吗?

At first I though there was a problem with my custom objects but I get the same thing with any and all framework objects. It does not do this with value objects but if the value objects are declared after the class objects I get the same error. I tried rebooting and I can't get it back to its normal behavior. Could this be a VS2010 bug?

 

 

推荐答案

有关此问题的更多信息.

More info on this problem.

我删除了项目对Linq库的引用​​,也删除了导入的名称空间.问题消失了,尽管我仍然无法解释.我碰巧不需要在项目中使用Linq,但是如果需要的话,该怎么办?

I removed the project's reference to the Linq library and removed the imported namespace to it as well. The problem went away although I still cant explain it. I happen to not need Linq in my project but what if I did?


这篇关于监视列表中的异常行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆