XmlReader.NameTable 属性

定义

当在派生类中被重写时,获取与该实现关联的 XmlNameTableWhen overridden in a derived class, gets the XmlNameTable associated with this implementation.

public:
 abstract property System::Xml::XmlNameTable ^ NameTable { System::Xml::XmlNameTable ^ get(); };
public abstract System.Xml.XmlNameTable NameTable { get; }
member this.NameTable : System.Xml.XmlNameTable
Public MustOverride ReadOnly Property NameTable As XmlNameTable

属性值

XmlNameTable

XmlNameTable,它使你能够获取该节点内字符串的原子化版本。The XmlNameTable enabling you to get the atomized version of a string within the node.

例外

在上一次异步操作完成之前调用了 XmlReader 方法。An XmlReader method was called before a previous asynchronous operation finished. 在此情况下,会引发 InvalidOperationException 并显示消息“异步操作已在进行中。”In this case, InvalidOperationException is thrown with the message "An asynchronous operation is already in progress."

注解

从返回的所有节点和属性名称 XmlReader 都使用进行原子化 NameTableAll node and attribute names returned from XmlReader are atomized using the NameTable. 如果多次返回相同的名称 (例如, Customer) ,则 String 将为该名称返回相同的对象。When the same name is returned multiple times (for example, Customer), then the same String object will be returned for that name. 这样一来,就可以编写有效的代码,对这些字符串进行对象比较,而不是对开销较高的字符串进行比较。This makes it possible for you to write efficient code that does object comparisons on these strings instead of expensive string comparisons.

适用于

另请参阅