I'm working on a hangman game for my 1st years final exam programming/analyst.
I basically have everything setup so it works but there is one thing that I am unable to accomplish.
My game will create an xml for each player where I will store that persons Won/Lost stats per difficulty selected.
<Stats Difficulty = "Easy">
<Stats Difficulty = "Medium">
<Stats Difficulty = "Hard">
I was able to query the XML on element and attribute by doing the following:
Dim query As IEnumerable(Of XElement) = From q In UserXML.<Stats> _
Where q.@Difficulty = Diff _
If I output query.value I get the 2 values of the elements Won and Lost but they are concatenated.
For example, If I do this query on difficulty Easy then I get as outcome = 100
Could someone please tell me how I can assign the values of Won and Lost to existing variables so I can use them afterwards?
I can assing aliases to the select values but I'm unsure how to use them oustide the query.