public double ConvertInGrn(ExchRate s, double cash) { double Sum = 0; switch (s) { case ExchRate.usd: { Sum = cash * this.usd; break; } case ExchRate.eur: { Sum = cash * this.eur; break; } case ExchRate.rub: { Sum = cash * this.rub; break; } default: { Console.WriteLine("Error!"); break; } } return(Sum); }
public double ConvertInGrn(ExchRate s, double cash) { double Sum = 0; switch (s) { case ExchRate.usd: { Sum = cash * this.usd; break; } case ExchRate.eur: { Sum = cash * this.eur; break; } case ExchRate.rub: { Sum = cash * this.rub; break; } default: { Console.WriteLine("Error!"); break; } } return Sum; }