I'm trying to use the sample code that I found here for something I'm working on: How to convert a string to an equivalent LINQ expression tree?
In the decision, the author uses the following:
var e = DynamicExpression.ParseLambda(new[] { p }, null, exp);
However, when I try to use it, it is not allowed. I get an error message:
System.Linq.Expressions.DynamicExpression 'does not contain a definition for' ParseLambda '
I installed the System Linq Dynamic nuget package in the project, I also added the using statement:
using System.Linq.Dynamic;
However, it looks gray, so I guess this does not mean that the DynamicExpression object that I am accessing from there, it selects it from System.Linq.Expression. Is there any way to fix this? I tried to do it
System.Linq.Dynamic.ParseLambda(new[] { p }, null, tagCondition);
but still no good, same error, and the using statement is still inactive.
source share