zzzprojects / Eval-Expression.NET

C# Eval Expression | Evaluate, Compile, and Execute C# code and expression at runtime.
https://eval-expression.net/
Other
449 stars 86 forks source link

An error occurred while parsing the interpolated string. #108

Closed cesaryuan closed 3 years ago

cesaryuan commented 3 years ago

The following code throws an exception, but it should work. Is there any problem when analyzing the interpolated string?

new EvalContext().Execute("$\"{\"1\"}\"");  // just $"{"1"}"

Exception message

Object reference not set to an instance of an object.
JonathanMagnan commented 3 years ago

Hello @cesaryuan ,

Thank you for reporting,

It looks indeed like a case that we never tested.

My developer will look at it.

Best Regards,

Jon

JonathanMagnan commented 3 years ago

Hello @cesaryuan ,

The v4.0.48 has been released.

Several issues similar to this one has been fixed in this release.

Could you try it and let us know if everything works fine with your expression?

Best Regards,

Jon

cesaryuan commented 3 years ago

Hello @cesaryuan ,

The v4.0.48 has been released.

Several issues similar to this one has been fixed in this release.

Could you try it and let us know if everything works fine with your expression?

Best Regards,

Jon

It Works great, thx.