Пример #1
0
        public void SubWithErrOperation()
        {
            var math = new SimpleMath();
            var d = new BinaryOpDouble(math.SubtractWithError);

            DisplayDelegateInfo(d);
            Console.WriteLine("10 - 3 is {0} (due to an error of calculator =] )", d(10, 3));
        }
Пример #2
0
        public void SubOperation()
        {
            var math = new SimpleMath();
            var d = new BinaryOp(math.Subtract); //if method is not static I've to create an istance of class to create the delegate

            DisplayDelegateInfo(d);
            Console.WriteLine("10 - 3 is {0} (due to an error of calculator =] )", d(10, 3));
        }