public override int GetHashCode() { unchecked { var hashCode = FirstSide.GetHashCode(); hashCode = (hashCode * 397) ^ SecondSide.GetHashCode(); hashCode = (hashCode * 397) ^ ThirdSide.GetHashCode(); return(hashCode); } }
protected bool Equals(ColoredTriangle other) { return(FirstSide.Equals(other.FirstSide) && SecondSide.Equals(other.SecondSide) && ThirdSide.Equals(other.ThirdSide)); }
public override double Length() { return(2 * (FirstSide.Length() + SecondSide.Length())); }
public override string ShowInfo() { return($"Прямоугольник со сторонами {FirstSide.Length():0.000} и {SecondSide.Length():0.000}, площадью {this.Area():0.000} и радиусом {this.Length():0.000}"); }
public double Area() { return(FirstSide.Length() * SecondSide.Length()); }