Mono Develop 2.4.1 + linq error.
Posted
by
Nev_Rahd
on Stack Overflow
See other posts from Stack Overflow
or by Nev_Rahd
Published on 2011-01-05T07:47:38Z
Indexed on
2011/01/05
7:54 UTC
Read the original article
Hit count: 176
I just started to learn Mono Develop
Installed Mono Develop 2.4.1 and trial version of Mono Touch.
my Code:
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;
}
}
}
This is throwing an error: An implementation of 'select' query expression pattern could not be found. Are you missing 'System.linq' using directive or 'System.Core.dll' assembly reference?
I got both references to System.Xml.Linq and System.Core
What am i missing ?
© Stack Overflow or respective owner