tumchaaditya
tumchaaditya

Reputation: 1297

Parse mathematical expression

I am designing an app which will have user input a complex math expression involving all sorts of mathematical operations(sin, cos, ln, factorial, power etc.). The user will see the expression in a textblock and it will be parsed later for further operations.

Now, this parsing part is where I am stuck. I want the expression in my code.

e.g. If user inputs sin(x)+cos(x), i want to be able to actually perform this operation for some value of x in my code.

I know there are a lot of similar questions out there. But, I want something specific to windows phone SDK.

Upvotes: 1

Views: 222

Answers (1)

Tigran
Tigran

Reputation: 62248

You may want to have a look on CodeDom Calculator - Evaluating C# Math Expressions dynamically. This is basically a class that enables you to eval the math expression and not only.

Upvotes: 2

Related Questions