0
我刚开始学习Mono DevelopMono Develop 2.4.1 + linq error
安装了Mono Develop 2.4.1和试用版的Mono Touch。
我的代码:
using System;
using System.Xml.Linq;
using System.Collections.Generic;
namespace RSSReader
{
public static class RSSRepository
{
public static IList<FeedItem> GetFeeds(string url)
{
XDocument rssFeed = XDocument.Load(url);
Console.Write(rssFeed.ToString());
var feeds = new List<FeedItem>();
try {
var query = from item in rssFeed.Descendants("item")
select new FeedItem
{
Title = item.Element("title").Value,
Published = DateTime.Parse(item.Element("pubDate").Value),
Url = item.Element("link").Value
};
feeds = query.ToList();
}
catch (Exception ex){
Console.WriteLine(ex.Message);
}
return feeds;
}
}
}
这是抛出一个错误:“选择”查询表达式模式的实现不能被发现。你是否使用伪指令或'System.Core.dll'程序集引用缺少'System.linq'?
我到System.Xml.Linq的和System.Core程序
我失去了什么都引用?