Example #1
0
        public static void Main()
        {
            CalculateProxy proxy = new CalculateProxy();

            Console.WriteLine("Calculations");
            Console.WriteLine("-------------");
            Console.WriteLine(Environment.NewLine + "10 + 5 = " + proxy.Add(10, 5));
            Console.WriteLine(Environment.NewLine + "10 - 5 = " + proxy.Subtract(10, 5));
            Console.WriteLine(Environment.NewLine + "10 * 5 = " + proxy.Multiply(10, 5));
            Console.WriteLine(Environment.NewLine + "10 / 5 = " + proxy.Divide(10, 5));
        }
Example #2
0
        static void Main()
        {
            // Create math proxy
            CalculateProxy proxy = new CalculateProxy();

            // Do some math
            Console.WriteLine("Calculations");
            Console.WriteLine("-------------");
            Console.WriteLine("\n10 + 5 = " + proxy.Add(10, 5));
            Console.WriteLine("\n10 - 5 = " + proxy.Subtract(10, 5));
            Console.WriteLine("\n10 * 5 = " + proxy.Multiply(10, 5));
            Console.WriteLine("\n10 / 5 = " + proxy.Divide(10, 5));

            // Wait for user
            Console.ReadKey();
        }