public static void Main(string[] args) { ShowMath sm1 = new ShowMath(Summation); sm1(4, 2); ShowMath sm2 = new ShowMath(new Program().Subtraction); sm2(4, 2); ShowMath sm3 = new ShowMath(Multiplication); sm3 += new Program().devision; sm3(5, 2); }
private static void Main() { const double a = 10; const double b = 12; BinaryNumericOperation op = CalculationService.Max; // var sum = CalculationService.Max(a, b); // var square = CalculationService.Square(a); var d = op.Invoke(a, b); // Console.WriteLine(sum); // Console.WriteLine(square); ShowMath showMath = CalculationService.ShowMax; showMath += CalculationService.ShowSum; showMath(a, b); }