How to save next nodes in a dictionary, where int is the auto-generated key and string (node value) using LINQ?
Elements:
XElement instructors =
XElement.Parse(
@"<instructors>
<instructor>Daniel</instructor>
<instructor>Joel</instructor>
<instructor>Eric</instructor>
<instructor>Scott</instructor>
<instructor>Joehan</instructor>
</instructors>"
);
partially attempted code is given below :
var qry = from instr in instructors.Elements("instructor")
where((p,index)=> **incomplete**).select..**incomplete**;
How to include my choice in Dictionary<int,String>? (The key must begin with 1, in Linq pointers begin with zero).
user192332
source
share