public static void Main() { CalculateInterest simpleInterestCalculationDelegate = GetSimpleInterest; CalculateInterest compoundInterestCalculationDelegate = GetCompoundInterest; InterestCalculator simpleCalc = new InterestCalculator(2500, 7.2, 15, simpleInterestCalculationDelegate,"simple"); InterestCalculator compoundCalc = new InterestCalculator(500, 5.6, 10, compoundInterestCalculationDelegate,"compound"); Console.WriteLine(simpleCalc); Console.WriteLine(compoundCalc); }
public static void Main() { CalculateInterest simpleInterestCalculationDelegate = GetSimpleInterest; CalculateInterest compoundInterestCalculationDelegate = GetCompoundInterest; InterestCalculator simpleCalc = new InterestCalculator(2500, 7.2, 15, simpleInterestCalculationDelegate, "simple"); InterestCalculator compoundCalc = new InterestCalculator(500, 5.6, 10, compoundInterestCalculationDelegate, "compound"); Console.WriteLine(simpleCalc); Console.WriteLine(compoundCalc); }