public int CompareTo(object obj) { JournalEntity temp = (JournalEntity)obj; if (CollectionName != temp.CollectionName) { return(CollectionName.CompareTo(temp.CollectionName)); } if (EventType != temp.EventType) { return(CollectionName.CompareTo(temp.CollectionName)); } return(ChangedObjectInformation.CompareTo(temp.ChangedObjectInformation)); }