Example #1
0
        static void Main(string[] args)
        {
            MathProxy proxy = new MathProxy();

            Console.WriteLine("4 + 2 = {0}", proxy.Add(4, 2));
            Console.WriteLine("4 - 2 = {0}", proxy.Sub(4, 2));
            Console.WriteLine("4 * 2 = {0}", proxy.Mul(4, 2));
            Console.WriteLine("4 / 2 = {0}", proxy.Div(4, 2));
            Console.ReadKey();
        }
Example #2
0
        static void Main()
        {
            MathProxy proxy = new MathProxy();


            Console.WriteLine("10 + 2 = " + proxy.Add(4, 2));
            Console.WriteLine("10 - 2 = " + proxy.Sub(4, 2));
            Console.WriteLine("10 * 2 = " + proxy.Mul(4, 2));
            Console.WriteLine("10 / 2 = " + proxy.Div(4, 2));

            Console.ReadKey();
        }
Example #3
0
        static void Main(string[] args)
        {
            // Create math proxy
            MathProxy proxy = new MathProxy();

            // Do the math
            Console.WriteLine("4 + 2 = " + proxy.Add(4, 2));
            Console.WriteLine("4 - 2 = " + proxy.Sub(4, 2));
            Console.WriteLine("4 * 2 = " + proxy.Mul(4, 2));
            Console.WriteLine("4 / 2 = " + proxy.Div(4, 2));
            // Wait for user
            Console.ReadKey();
        }
        static void Main(string[] args)
        {
            //proxy
            Proxy proxy = new Proxy();

            proxy.Request();

            //Example as below
            MathProxy mathProxy = new MathProxy();

            Console.WriteLine("4 + 2 = " + mathProxy.Add(4, 2));
            Console.WriteLine("4 - 2 = " + mathProxy.Sub(4, 2));
            Console.WriteLine("4 * 2 = " + mathProxy.Mul(4, 2));
            Console.WriteLine("4 / 2 = " + mathProxy.Div(4, 2));
            Console.ReadKey();
        }
Example #5
0
        static void Main(string[] args)
        {
            // Create proxy and request a service
            Proxy proxy = new Proxy();

            proxy.Request();

            //x
            // Create math proxy
            MathProxy proxy2 = new MathProxy();

            // Do the math
            Console.WriteLine("4 + 2 = " + proxy2.Add(4, 2));
            Console.WriteLine("4 - 2 = " + proxy2.Sub(4, 2));
            Console.WriteLine("4 * 2 = " + proxy2.Mul(4, 2));
            Console.WriteLine("4 / 2 = " + proxy2.Div(4, 2));

            Console.ReadKey();
        }