public override bool Equals(object obj) { if (obj == null) { return(false); } if (!(obj is Fraction other)) { return(false); } var lcdOperator = new Lcd(); var lcd = lcdOperator.Execute(Denominator, other.Denominator); return((Numerator * (long)lcd / (long)Denominator) == (other.Numerator * (long)lcd / (long)other.Denominator)); }