using System.Linq.Expressions;
using System.Linq.Dynamic.Core;
using System.Linq.Dynamic.Core.Parser;
public static void Main()
ParameterExpression x = Expression.Parameter(typeof(int), "x");
ParameterExpression y = Expression.Parameter(typeof(int), "y");
var symbols = new[] { x, y };
Expression body = new ExpressionParser(symbols, "(x + y) * 2", symbols, new ParsingConfig()).Parse(typeof(int));
LambdaExpression e = Expression.Lambda(body, new ParameterExpression[] { x, y });
var result = c.DynamicInvoke(1, 2);
Console.WriteLine(result);