ValueAsDouble, ValueAsInt32, ValueAsInt64, ValueAsSingle : XPathDocument « XML « VB.Net






ValueAsDouble, ValueAsInt32, ValueAsInt64, ValueAsSingle

  

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("numberElement", "")
        Dim doubleValue As Double = navigator.ValueAsDouble
        Dim int32Value As Int32 = navigator.ValueAsInt
        Dim int64Value As Int64 = navigator.ValueAsLong
        Console.WriteLine(navigator.LocalName + ": " + doubleValue)
        Console.WriteLine(navigator.LocalName + ": " + int32Value)
        Console.WriteLine(navigator.LocalName + ": " + int64Value)

    End Sub
End Class

   
    
  








Related examples in the same category

1.Value As Date Time