NCalc is a fast and lightweight expression evaluator library for .NET, designed for flexibility and high performance. It supports a wide range of mathematical and logical operations.
Hi, i get this exception when using chinese characters in parameters:
string exp = "2 * 参数1";
Expression e = new Expression(exp);
e.Parameters["参数1"] = 5;
var v = e.Evaluate();
exception:
NCalc.Exceptions.NCalcParserException: Error parsing the expression.
---> NCalc.Exceptions.NCalcParserException: Invalid token in expression at position (1:2)
at NCalc.Parser.LogicalExpressionParser.Parse(LogicalExpressionParserContext context)
at NCalc.Factories.LogicalExpressionFactory.Create(String expression, ExpressionOptions options)
at NCalc.Factories.LogicalExpressionFactory.NCalc.Factories.ILogicalExpressionFactory.Create(String expression, ExpressionOptions options)
--- End of inner exception stack trace ---
Hi, i get this exception when using chinese characters in parameters:
exception: NCalc.Exceptions.NCalcParserException: Error parsing the expression. ---> NCalc.Exceptions.NCalcParserException: Invalid token in expression at position (1:2) at NCalc.Parser.LogicalExpressionParser.Parse(LogicalExpressionParserContext context) at NCalc.Factories.LogicalExpressionFactory.Create(String expression, ExpressionOptions options) at NCalc.Factories.LogicalExpressionFactory.NCalc.Factories.ILogicalExpressionFactory.Create(String expression, ExpressionOptions options) --- End of inner exception stack trace ---