Mega Code Archive

 
Categories / VB.Net / XML
 

Reads the current element and returns the contents as a double-precision floating-point number

Imports System Imports System.IO Imports System.Xml Public Class Sample   Public Shared Sub Main()         Using reader As XmlReader = XmlReader.Create("dataFile.xml")           reader.ReadToFollowing("double")           Dim number As [Double] = reader.ReadElementContentAsDouble()           ' Do some processing with the number object.         End Using     End Sub End Class