mathematical String Evaluation

K

kris Palmby

hi,

I'm trying to do something which I assume is fairly simple but I jsut cannot
seem to do it.

I have a string which i am trying to evaluate Mathematically
for Example

Dim strEval as string
Dim decEval as Decimal

strEval = "(10+5) * 6"

I'm trying to get decEval = 90

Can anyone help me out with this?

Thanks
Kris
 
G

Guest

I have a string which i am trying to evaluate Mathematically
for Example

Dim strEval as string
Dim decEval as Decimal

strEval = "(10+5) * 6"

I'm trying to get decEval = 90

Can anyone help me out with this?

I don't think .NET has a command to do this... I think you need a 3rd party
Math Parser to do this (or wirte your own class). Check this thread (and
google):

http://groups.google.ca/group/microsoft.public.dotnet.languages.csharp/brow
se_thread/thread/ffa69c642f9338c3/4dd4571aa1ea677e?
lnk=st&q=Math+Parser+.NET&rnum=1&hl=en#4dd4571aa1ea677e
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top