public int CompareTo(AdminInviteController other) { if (other.Invite.IsAdmin == Invite.IsAdmin) { if (other.UnreadMessageCount == UnreadMessageCount) { return(Invite.CompareTo(other.Invite)); } else { return(other.UnreadMessageCount.CompareTo(UnreadMessageCount)); } } else { return(other.Invite.IsAdmin.CompareTo(Invite.IsAdmin)); } }