If I have a string such as "1=1" or "True And False And True Or True", for
example, is there a way in VB.Net to evaluate this into a true or false
boolean? I have been using the script COM control with the Eval statement to
do this, but is there a way to do this purely in .Net? Maybe using
reflection or some other technology?

Derek

Re: Evalute String by Wiktor

Wiktor
Wed Aug 20 01:24:32 CDT 2003


"Derek Hart" <dmhart@gte.net> wrote in message
news:emFu4KuZDHA.1384@TK2MSFTNGP10.phx.gbl...
> If I have a string such as "1=1" or "True And False And True Or True", for
> example, is there a way in VB.Net to evaluate this into a true or false
> boolean? I have been using the script COM control with the Eval statement
to
> do this, but is there a way to do this purely in .Net? Maybe using
> reflection or some other technology?
>
> Derek
>
>

try to generate the code in the runtime.

http://www.codeproject.com/csharp/runtime_eval.asp



Re: Evalute String by Derek

Derek
Thu Aug 21 14:48:56 CDT 2003

Do you know of a VB.Net version of the code?

Derek

"Wiktor Zychla" <ieUser@microsoft.com.no.spam> wrote in message
news:ubKe5OuZDHA.2352@TK2MSFTNGP12.phx.gbl...
>
> "Derek Hart" <dmhart@gte.net> wrote in message
> news:emFu4KuZDHA.1384@TK2MSFTNGP10.phx.gbl...
> > If I have a string such as "1=1" or "True And False And True Or True",
for
> > example, is there a way in VB.Net to evaluate this into a true or false
> > boolean? I have been using the script COM control with the Eval
statement
> to
> > do this, but is there a way to do this purely in .Net? Maybe using
> > reflection or some other technology?
> >
> > Derek
> >
> >
>
> try to generate the code in the runtime.
>
> http://www.codeproject.com/csharp/runtime_eval.asp
>
>