System.Xml.XPath.XPathNavigator.ValueAsDateTime Property

Gets the current node's value as a DateTime.

Syntax

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

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

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