saeed_AlRabid
saeed_AlRabid
CC#
Created by saeed_AlRabid on 2/4/2023 in #help
❔ Flee Library, Issue add Variable to Variable Collection with Null Value
I'm using flee third party Library to evaluate expression . I want to add Variable to expression with null value like this code in below 👇:
ExpressionContext context= new ExpressionContext ();
var variables = context.Varibles;

variables.Add("a",null);

var compile = context.CompileGeneric<bool>("((a is not null) and (a>5))");
var result = compile.Evaluate();
ExpressionContext context= new ExpressionContext ();
var variables = context.Varibles;

variables.Add("a",null);

var compile = context.CompileGeneric<bool>("((a is not null) and (a>5))");
var result = compile.Evaluate();
I got exception ArgumentNullException . is there any way to add variable with null value. Note : i wouldn't to check value in code because the string expression is input from user
3 replies