How to use ncalc in a wp7 app?

378 Views Asked by At

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...

1

There are 1 best solutions below

1
On

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