Esempio n. 1
0
 public bool Equals(IConstructionSize other)
 {
     if (other == null)
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(Length == other.Length && Width == other.Width && Height == other.Height);
 }
Esempio n. 2
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);
        }