private static void Main(string[] args) { var calc = new Calculator(); var a = 5; var b = 8; Console.WriteLine((calc as IMultiplyer).Calculate(a, b)); Console.WriteLine((calc as ISumator).Calculate(a, b)); var proCalc = new ProCalculator(); Console.WriteLine((proCalc as IMultiplyer).Calculate(a, b)); Console.WriteLine((proCalc as ISumator).Calculate(a, b)); Console.ReadKey(); }
public static void AllowPro() { Console.WriteLine("\nПлатная версия"); ProCalculator.GetSolution(); }