public void Run() { int numberX = 0, numberY = 0; int UserChoise = 0; double result = 0D; if (GetNumberFromUser != null) { numberX = GetNumberFromUser.Invoke(); numberY = GetNumberFromUser.Invoke(); } if (MenuPrinter != null) { MenuPrinter.Invoke(); } if (GetUserChoise != null) { UserChoise = GetUserChoise.Invoke(); } if (Calculate != null) { result = Calculate.Invoke(numberX, numberY, UserChoise); } if (ResultPrint != null) { ResultPrint.Invoke(result); } }
public void Go() { int numX, numY; int Choise; double print_on_screen; numX = GetNumberFromUser.Invoke(); numY = GetNumberFromUser.Invoke(); MenuPrinter.Invoke(); Choise = GetUserChoise.Invoke(); print_on_screen = Calculate.Invoke(numX, numY, Choise); ResultPrint.Invoke(print_on_screen); }