Evalute String

  • Thread starter Thread starter Derek Hart
  • Start date Start date
D

Derek Hart

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
 
Derek Hart said:
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
 

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

Back
Top