XDocument xdoc = XDocument.Load(Global.DATA_XML_FILE_PATH);
var data = from qurey in xdoc.Descendants(Global.NODE_RECORD)
select new Record
{
};
些了如上的代码,
一直报错,报错信息如下:
Error 1 Could not find an implementation of the query pattern for source type 'System.Collections.Generic.IEnumerable<System.Xml.Linq.XElement>'. 'Select' not found. Are you missing a reference to 'System.Core.dll' or a using directive for 'System.Linq'?
我已经添加了System.Xml.Linq.dll,并且using了。
哪位大侠知道这是为什么啊?
------解决方案--------------------
Are you missing a reference to 'System.Core.dll' or a using directive for 'System.Linq'?