------------------------
///
/// Sorting for RSSItem
///
public void Sort()
{
InnerList.Sort(new RssItemComparer());
}
class RssItemComparer : IComparer
{
public int Compare(object x, object y)
{
return ((RssItem)y).CompareTo((RssItem)x);
}
}
in RssItem.cs
--------------
public int CompareTo(object obj)
{
return this.pubDate.CompareTo(((RssItem)obj).pubDate);
}
No comments:
Post a Comment