共用方式為


XmlQueryRuntime.ComparePosition(XPathNavigator, XPathNavigator) 方法

定義

比較兩個導覽的相對位置。

public:
 int ComparePosition(System::Xml::XPath::XPathNavigator ^ navigatorThis, System::Xml::XPath::XPathNavigator ^ navigatorThat);
public int ComparePosition (System.Xml.XPath.XPathNavigator navigatorThis, System.Xml.XPath.XPathNavigator navigatorThat);
member this.ComparePosition : System.Xml.XPath.XPathNavigator * System.Xml.XPath.XPathNavigator -> int
Public Function ComparePosition (navigatorThis As XPathNavigator, navigatorThat As XPathNavigator) As Integer

參數

navigatorThis
XPathNavigator

XPathNavigator 類別的執行個體。

navigatorThat
XPathNavigator

XPathNavigator 類別的執行個體。

傳回

如果 navigatorThisnavigatorThat 之前,為 -1;如果 navigatorThisnavigatorThat 之後,為 1;如果兩個導覽都位於同一個節點,則為 0。

適用於