public int CompareTo(ScreenMode other) { var order = Width.CompareTo(other.Width); if (order == 0) { return(Height.CompareTo(other.Height)); } return(order); }
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)); }
//---------------------------------------------------------------------- public int CompareTo(ScreenMode _other) { int iOrder = Width.CompareTo(_other.Width); if (iOrder == 0) { return(Height.CompareTo(_other.Height)); } else { return(iOrder); } }
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); }
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); }
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)); }
public int CompareTo(HeightData other) => Height.CompareTo(other.Height);
public int CompareTo(BoxHeight other) { return(Height.CompareTo(other.Height)); }