1

i am new to wp7 programming and c# and i want to use a mathematical parser for my app. I found ncalc that everyone says it works great for windows phone, but i don't know how to use it inside my app.I have downloaded the binaries and i added them in my app but when i use a simple expression like this: Expression e = new Expression("2 + 3 * 5"); Debug.Assert(17 == e.Evaluate()); it gives me a bunch of errors.Someone who have used ncalc could tell me how he made it work?

I searched the internet but i couldn't find something.Please help me...

Matt Lacey
  • 65,560
  • 11
  • 91
  • 143
Josh
  • 53
  • 1
  • 7

1 Answers1

0

I'm actually having a similar issue (trying ncalc) and basically it seems like you can't use a .Net runtime with the windows phone/silver light project. You'll need to get the source code and recompile under a windows phone class library project.

Unfortunately, I haven't been able to get this working yet since ncalc source code uses another dll antlr3.runtime with the same issue. Running in circles. If i find another way or anyone has any ideas or links please post.

stack overflow link on the same issue by someone else

Community
  • 1
  • 1
Jason
  • 70
  • 2
  • 6
  • Check out an alternative here by http://stackoverflow.com/questions/5279744/library-to-parse-a-string-as-a-formula-that-works-with-windows-phone-7/12083551#12083551 http://www.blackbeltcoder.com/Articles/algorithms/a-c-expression-evaluator. – Jason Aug 23 '12 at 01:28