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:
Public Class Form1 Private MusicHolder As List(Of Music) Private Function Get() As List(Of Music) Dim xml As New XmlDocument xxl.Load("Path") Dim items As XmlNodeList = xml.SelectNodes("/path/") Return (From i In items Select New Music With {.ID = node.SelectSingleNode("Artist").InnerText, .Song = node.SelectSingleNode("Song").InnerText,}).ToList() End Function End Class