在运行时评估,编译和执行动态C#代码和表达式 从简单的C#数学表达式... int result = Eval . Execute < int>( " X + Y " , new { X = 1 , Y = 2 }); 以复杂的代码来解析。 int result = Eval . Execute < int>( @" var list = new List() { 1, 2, 3, 4, 5 }; var filter = list.Where(x => x < 4 xss=removed> x); " ); Eval Expression.