XmlReader.Depth XmlReader.Depth XmlReader.Depth XmlReader.Depth Property

定义

当在派生类中被重写时,获取 XML 文档中当前节点的深度。When overridden in a derived class, gets the depth of the current node in the XML document.

public:
 abstract property int Depth { int get(); };
public abstract int Depth { get; }
member this.Depth : int
Public MustOverride ReadOnly Property Depth As Integer

属性值

XML 文档中当前节点的深度。The depth of the current node in the XML document.

异常

在上一次异步操作完成之前调用了 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."

示例

请参阅Depth(在XmlTextReader类) 使用此属性的示例。See Depth (in the XmlTextReader class) for an example using this property.

适用于