Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set the Culture for expression evaluation #3

Open
butulia opened this issue Sep 2, 2022 · 2 comments
Open

Set the Culture for expression evaluation #3

butulia opened this issue Sep 2, 2022 · 2 comments

Comments

@butulia
Copy link
Contributor

butulia commented Sep 2, 2022

Hi @matheval

First of all thank you very much for your work, I am very satisfied with the library. Very good work.

Evaluating formulas with numeric literals can give errors depending on the thread's CurrentCulture. It would be very helpful if, when instantiating an Expression, you could indicate the culture you want to work with, for example, through a chained method, just like you have SetScale().

Proposal example:
new Expression("18293.3402*403.282").SetCulture(CultureInfo.InvariantCulture).Eval<decimal>();

Thank you very much in advance, regards

@matheval
Copy link
Owner

matheval commented Sep 3, 2022

@butulia
Thank for your feedback.
I promised another guy that I would fix #2 issue by this year July but I haven't done yet.
I will try to combine #2 and #3(your issue) on this year and release new nuget version.

matheval added a commit that referenced this issue Sep 6, 2022
Fix Issues #2 and #3 from Butulia
@matheval
Copy link
Owner

matheval commented Sep 8, 2022

Thank you very much. New version of Nuget will be upload soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants