This project is a simple mathematical expression parser written in C#. It's the refactoring of an old project and uses an AST-evaluation algorithm. You can use built-in or add your functions and variables to global scope. It was written
primarily for fun and and as programming exercise; anyway if you anyone find it useful, please send feature requests or issues; but please take note that
this is still a work in progress
At the moment
is just a draft.
var myvar1 = Evaluator.EvaluateAs<double>("pi - 2");
var context = new Context()
(args) => (TypeConverter.ToNumber(args) + MyMath.DoCalc(args)));
var result = context.EvaluateAs<double>("myvar1 + (.999 * myfunc(myvar1, 7.789))");
var isTrue = context.EvaluateAs<bool>("myvar2 == 12.345");
CodePlex (package download): 0.6.0.1 alfa
GitHub (source repository): 0.6.0.5 alfa
NuGet: not yet released
Until the it stabilizes you're invited to use the more recent version possible.