Value As Date Time : XPathDocument « XML « VB.Net






Value As Date Time

  
Imports System
Imports System.Xml
Imports System.Xml.XPath

Public Class MainClass

    Public Shared Sub Main()
        Dim document As XPathDocument = New XPathDocument("valueas.xml")
        Dim navigator As XPathNavigator = document.CreateNavigator()

        navigator.MoveToNext("dateTimeElement", "")
        Dim dateTimeValue As DateTime = navigator.ValueAsDateTime
        Console.WriteLine(navigator.LocalName + ": " + dateTimeValue)

    End Sub
End Class

   
    
  








Related examples in the same category

1.ValueAsDouble, ValueAsInt32, ValueAsInt64, ValueAsSingle