Example #1
0
 public void addItem(RSSItem newItem)
 {
     if (newItem != null)
     {
         items.Add(newItem);
         items.Sort();
     }
     else
     {
         throw new ArgumentNullException(nameof(newItem));
     }
 }
Example #2
0
        public int CompareTo(object obj)
        {
            if (obj == null)
            {
                return(1);
            }

            RSSItem otherItem = obj as RSSItem;

            if (otherItem != null)
            {
                return(this.guid.CompareTo(otherItem.guid));
            }
            else
            {
                throw new ArgumentException("Object is not a RSSItem");
            }
        }