Ejemplo n.º 1
0
        public int CompareTo(ScreenMode other)
        {
            var order = Width.CompareTo(other.Width);

            if (order == 0)
            {
                return(Height.CompareTo(other.Height));
            }
            return(order);
        }
Ejemplo n.º 2
0
        public int CompareTo(object other)
        {
            Person otherPerson = other as Person;

            if (Height.Equals(otherPerson.Height))
            {
                return(Weight.CompareTo(otherPerson.Weight));
            }

            return(Height.CompareTo(otherPerson.Height));
        }
Ejemplo n.º 3
0
        //----------------------------------------------------------------------
        public int CompareTo(ScreenMode _other)
        {
            int iOrder = Width.CompareTo(_other.Width);

            if (iOrder == 0)
            {
                return(Height.CompareTo(_other.Height));
            }
            else
            {
                return(iOrder);
            }
        }
Ejemplo n.º 4
0
            public int CompareTo(object obj)
            {
                int c = Width.CompareTo(((Resolution)obj).Width);

                if (c != 0)
                {
                    return(c);
                }
                c = Height.CompareTo(((Resolution)obj).Height);
                if (c != 0)
                {
                    return(c);
                }
                c = BitCount.CompareTo(((Resolution)obj).BitCount);
                return(c);
            }
Ejemplo n.º 5
0
        public int CompareTo(IConstructionSize other)
        {
            var res = Length.CompareTo(other.Length);

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

            res = Width.CompareTo(other.Width);
            if (res != 0)
            {
                return(res);
            }

            res = Height.CompareTo(other.Height);
            return(res);
        }
Ejemplo n.º 6
0
        public int CompareTo(CorpBox other)
        {
            if (ReferenceEquals(this, other))
            {
                return(0);
            }
            if (ReferenceEquals(null, other))
            {
                return(1);
            }
            var xComparison = X.CompareTo(other.X);

            if (xComparison != 0)
            {
                return(xComparison);
            }
            var yComparison = Y.CompareTo(other.Y);

            if (yComparison != 0)
            {
                return(yComparison);
            }
            var widthComparison = Width.CompareTo(other.Width);

            if (widthComparison != 0)
            {
                return(widthComparison);
            }
            var heightComparison = Height.CompareTo(other.Height);

            if (heightComparison != 0)
            {
                return(heightComparison);
            }
            return(Rank.CompareTo(other.Rank));
        }
Ejemplo n.º 7
0
 public int CompareTo(HeightData other) => Height.CompareTo(other.Height);
Ejemplo n.º 8
0
 public int CompareTo(BoxHeight other)
 {
     return(Height.CompareTo(other.Height));
 }