My project has the following structures:
public struct Money
{
public CurrencyCodes Currency;
public decimal Amount;
}
public class Foo
{
public Money AdultFare { get; set; }
public Money ChildFare { get; set; }
public Money BabyFare { get; set; }
public Money AdultFee { get; set; }
public Money ChildFee { get; set; }
public Money BabyFee { get; set; }
public Money TotalFare { get; set; }
public Money TotalFee { get; set; }
}
Now I need to convert all Foo monetary fields from one currency to another. What is the best solution design? use reflection? some another idea?