public int CompareTo(ViewKey other) { if (other == null) { return(1); } // // Sorted by descending EffectiveDate, then itemID (ascending) // int cmp = -DateTime.Compare(EffectiveDate, other.EffectiveDate); if (cmp == 0) { cmp = ItemKey.Compare(Key, other.Key); } return(cmp); }