I'm using the Compute method to evaluate an expression. My current locale is de-DE. This is simply done by:
var dt = new DataTable() {
Locale = CultureInfo.CurrentCulture,
};
var v = dt.Compute(myExpression);
When I enter an expression such as:
30.5 / 2.25
The expression is evaluated correctly.
However, when as my locale is different, I need to enter the above expression as:
30,5 / 2,25
The expression is not evaluated as expected.
How do I get the Compute method to evaluate expression correctly for the given locale?