0

Guys I have to evaluate a mathematical expression(which is represented by a string). Till now I had simple expressions thus the following was working fine

var result = new DataTable().Compute(STRING_HERE, null);

However now my string expression is becoming a bit more complex and the above method is starting to give errors.

Any idea of how I can handle this situation ?

Please I would like some kind of inbuilt method or function like apporach(preferably).

Anoushka Seechurn
  • 2,166
  • 7
  • 35
  • 52

1 Answers1

1

Not inbuild, but NCalc (http://ncalc.codeplex.com/) is a very nice library for evaluating math expressions.

user1501961
  • 818
  • 9
  • 12