public void addItem(RSSItem newItem) { if (newItem != null) { items.Add(newItem); items.Sort(); } else { throw new ArgumentNullException(nameof(newItem)); } }
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"); } }