Esempio n. 1
0
        public void ExpressionTreeModifyToAdd()
        {
            ExpressionTreeExample ete = new ExpressionTreeExample();
            Func <int, int>       add = ModifyExpressionTree(ete.BuildExpressionTrees <int>());

            Console.WriteLine(add(5));
        }
Esempio n. 2
0
        public void ExpressionTreeMultiply()
        {
            ExpressionTreeExample         ete   = new ExpressionTreeExample();
            Expression <Func <int, int> > eTree = ete.BuildExpressionTrees <int>();
            Func <int, int> compileTree         = eTree.Compile();

            Console.WriteLine(compileTree(5));
        }