0
我試圖解析一些簡單的XML這樣的時候沒有發現:的WinRT:「其中」解析XML
XElement thisLevel = from l in xmlElements.Descendants("Level")
where l.Element("LevelNum") == thisLevel
select l;
但我得到一個錯誤的「水平」的說法:
未能進行查找源類型爲 'System.Collections.Generic.IEnumerable'的查詢模式的實現。 '找不到'。您是否缺少'System.Linq'的參考或使用指令 ?
奇怪的是我能搶的後代:
var levels = xmlElements.Descendants("Level");
這一工程,但我似乎沒有能夠在那裏就可以了。
您是否在錯誤消息中提供了「Sytstem.Linq」的引用和使用指令? – ChrisF 2013-03-02 12:42:28
糟糕。我錯誤地認爲使用System.Xml.Linq會包含linq。我的問題很糟糕。 – micahhoover 2013-03-02 12:49:21