System.Xml.XPath.XPathNavigator.ValueAsInt Property

Gets the current node's value as an int.

Syntax

public override int ValueAsInt { get; }

Value

Documentation for this section has not yet been entered.

Remarks

If the System.Xml.XPath.XPathNavigator has schema or type information (for example, from an System.Xml.XmlDocument object initialized with an XML schema validating System.Xml.XmlReader), and if the current node is defined as an XML Schema xs:integer type, the XPathNavigator.ValueAsInt property returns the current node's value as an unboxed int object.

However, if the System.Xml.XPath.XPathNavigator does not have any schema or type information, the XPathNavigator.ValueAsInt property attempts to convert the string value of the current node to a int value, according to the XPath 2.0 casting rules for xs:integer.

Requirements

Namespace: System.Xml.XPath
Assembly: System.Xml (in System.Xml.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0