Uses the supplied context to evaluate the System.Xml.XPath.XPathExpression, and returns the typed result.
- expr
- An System.Xml.XPath.XPathExpression that can be evaluated.
- context
- An System.Xml.XPath.XPathNodeIterator that points to the selected node set that the evaluation is to be performed on.
The result of the expression (Boolean, number, string, or node set). This maps to bool, double, string, or System.Xml.XPath.XPathNodeIterator objects respectively.
The expression is evaluated using the XPathNodeIterator.Current node of the System.Xml.XPath.XPathNodeIterator as the context node. If context is null, the node on which the System.Xml.XPath.XPathNavigator is currently positioned is used as the context node.
The position() and last() functions, unless used as a predicate in a location step, always return 0 under the following conditions:
The context argument is null.
XPathNodeIterator.MoveNext has not been called on the System.Xml.XPath.XPathNodeIterator.
Because the position() and last() functions work on the current node, you should not use the XPathNodeIterator.Current property to move away from the selected node set. This could invalidate the state of the System.Xml.XPath.XPathNavigator.
This method has no effect on the state of the System.Xml.XPath.XPathNavigator.