5
कैसे शब्दकोश जहां पूर्णांक एक स्वत: जनरेट की कुंजी और स्ट्रिंग (नोड का मूल्य) LINQ उपयोग कर रहा है में निम्न में से नोड्स स्टोर करने के लिए?Linq -Dictionary रूपांतरण XML में
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**;
कैसे Dictionary<int,String>
में मेरा चयन चालू करने के लिए? (कुंजी 1 से शुरू कर देना चाहिए; Linq में indicies शून्य से शुरू)।
हाँ, यह बहुत अच्छा काम कर रहा है, धन्यवाद –
आप LINQ पर किसी विशेष लेख लिखे है? –
नहीं वास्तव में - मैं इसे हर के बारे में इतनी बार हालांकि ब्लॉग। –