示例#1
0
        private static void Proxy()
        {
            //create proxy
            MathProxy proxy = new MathProxy();

            //Do your calculations
            Console.WriteLine("\n ----------------- Using Math Proxy to do my Calculations ----------------------");
            Console.WriteLine("4 + 2 = " + proxy.Add(4, 2));
            Console.WriteLine("4 - 2 = " + proxy.Subtract(4, 2));
            Console.WriteLine("4 * 2 = " + proxy.Multiply(4, 2));
            Console.WriteLine("4 / 2 = " + proxy.Divide(4, 2));
        }