Пример #1
0
        public virtual int CompareTo(ComparableBaseObject <TMember> other)
        {
            UsedCompareTo = true;

            if (ReferenceEquals(this, other))
            {
                return(0);
            }

            if (other is null)
            {
                return(1);
            }

            var compare = Comparer.Compare(Field, other.Field);

            if (compare != 0)
            {
                return(compare);
            }

            return(Comparer.Compare(Property, other.Property));
        }
Пример #2
0
 public override int CompareTo(ComparableBaseObject <TMember> other) => CompareTo(other as ComparableChildObject <TMember>);