System.Xml.XPath.XPathNavigator.ValueAsBoolean Property

Gets the current node's value as a bool.

Syntax

public override bool ValueAsBoolean { 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:boolean type, the XPathNavigator.ValueAsBoolean property returns the current node's value as an unboxed bool object.

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

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