//overrided ToString() public override string ToString() { if (Denominator == 1) { return(Nominator.ToString()); } else { return(this.Nominator + "r" + this.Denominator); } }
public override string ToString() { string result = ""; if (!Sign) { result += "-"; } result += Nominator.ToString(); result += "/"; result += Denominator.ToString(); return(result); }