I have an expression which contains numbers that are separated by , or .
, i.e a number in the expression can be 2,3 or 2.3
. I get values to generate the expression from the database where the values are stored in one of the above format. I have an additional textbox in the Calculate
page where the user enters a value during runtime.
If the value are in the format 2.3
the value is computed by DataTable.Compute
and the result is in the comma separated format. How do I make DataTable.Compute
to evaluate any string?
I have added but still it doesn't work. I get SyntaxErrorException
Thread.CurrentThread.CurrentCulture = new CultureInfo("de-DE");
EDIT
Replacing the ,
in the expression with .
can solve the problem. But when the result is displayed in the comma separated format why doesn't it accept input in the same format?