问题描述
这是我的新手,正在学习教程.我对以下代码进行了修改:
I'm new to this and working from a tutorial. I have a variation on the following code:
Dim xDoc As XPathDocument
Dim xNav As XPathNavigator
xDoc = New XPathDocument("xxxxxxx.xml")
xNav = xDoc.CreateNavigator()
但是,"CreateNavigator"返回:'debuggerDisplayProxy'是一种类型,不能用作表达式.
However, "CreateNavigator" returns: 'debuggerDisplayProxy' is a type and cannot be used as an expression.
我已经搜索过Google并没有发现任何内容(尽管我不确定要查找的内容).这似乎是基本的东西,它使我无法继续从事我所知道的许多其他工作!
I've Googled and searched and found nothing (although I'm not really sure what to look for). This seems like something basic and it's stopping me from continuing with a lot of other stuff that I know works!
推荐答案
这不是真正的错误,调试器在类的属性上存在问题:
It is not a real error, the debugger has a problem with the attribute on the class:
<DebuggerDisplay("{debuggerDisplayProxy}")> _
Public MustInherit Class XPathNavigator
'' etc..
End Class
名称拼写错误,应为"DebuggerDisplayProxy",大写D.由于某些原因,这仅在VB.NET中出现错误,这在C#中不是问题,因此这可能就是为什么它未得到修复的原因然而.只需单击[+]即可查看对象的内部成员.继续,您的代码没有任何问题.
The name is spelled wrong, it should be "DebuggerDisplayProxy" with a capital D. For some reason this only goes wrong in VB.NET, this isn't a problem in C# so that's probably why it hasn't been fixed yet. Just keep clicking on the [+] to see the internal members of the object. And keep going, there's nothing wrong with your code.
我在 Connect .
这篇关于VB.NET XPathDocument.CreateNavigator抛出"debuggerDisplayProxy".错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!