Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27017

Option strict disallows late binding xDocument

$
0
0
Cant work this out for the life of me. Not got VS here but if i declare I as xmlNode its option strict disallows conversion from object to xmlnode. I understand the errors just cant work them out. Music is a structure with two items

vb Code:
  1. Public Class Form1
  2.  
  3.     Private MusicHolder As List(Of Music)
  4.     Private Function Get() As List(Of Music)
  5.         Dim xml As New XmlDocument
  6.         xxl.Load("Path")
  7.         Dim items As XmlNodeList = xml.SelectNodes("/path/")
  8.         Return (From i In items Select New Music With {.ID = node.SelectSingleNode("Artist").InnerText, .Song = node.SelectSingleNode("Song").InnerText,}).ToList()
  9.     End Function
  10.  
  11. End Class

Viewing all articles
Browse latest Browse all 27017

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>