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
 
Back
Top