Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            MathProxy mathProxy = new MathProxy();

            Console.WriteLine("Add (4,2) : -> " + mathProxy.Add(4, 2));

            Console.WriteLine("Sub (4,2) : -> " + mathProxy.Sub(4, 2));

            Console.WriteLine("Mul (4,2) : -> " + mathProxy.Mul(4, 2));

            Console.WriteLine("Div (4,2) : -> " + mathProxy.Div(4, 2));

            Console.ReadKey();
        }
Ejemplo n.º 2
0
        public static void Run()
        {
            var calculator = new MathProxy();
            var add        = calculator.Add(1, 2);

            Console.WriteLine($"Add(1,2) = {add}");

            var sub = calculator.Sub(2, 1);

            Console.WriteLine($"Sub(2,1) = {sub}");

            var multi = calculator.Multi(2, 6);

            Console.WriteLine($"Multi(2,6) = {multi}");

            var div = calculator.Div(10, 2);

            Console.WriteLine($"Div(10,2) = {div}");
        }