Can't you use the CodeDOM to do this?  Wrap the whole thing in a class
(in the CodeDOM) and evaluate it.  No?

Thanks,

Shawn Wildermuth
[EMAIL PROTECTED]

> -----Original Message-----
> From: dotnet discussion [mailto:[EMAIL PROTECTED]]
> On Behalf Of Stephens
> Sent: Monday, April 15, 2002 8:36 AM
> To: [EMAIL PROTECTED]
> Subject: [DOTNET] Evaluate math expression strings?
>
>
> > Does the framework have (or is someone willing to share :)
> ) a utility
> > class to do this? Or will I need to build my own interpreter?
> > Something like...
> >
> > int result = MyMath.Evaluate( "(10 / 2) * 3" );
>
> There's some VB 6 code that evaluates simple expressions at:
>
    http://www.vb-helper.com/HowTo/expr.zip

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to