Executing the code contained in a string?

  • Thread starter Thread starter Robin Tucker
  • Start date Start date
R

Robin Tucker

Is it possible to execute the code contained in a string? I would like to
create a wizard for making a custom "filter" in my software, much the same
as Outlook Express has mail "rules", ie:

Show nodes where the
{condition,action string, condition string, type}
{ equals, doesn't equal, is greater than, is less than }
{ value }
{ and, or }
{condition,action string, condition string, type}
{ equals, doesn't equal, is greater than, is less than }
{ value }

and of course, I can parse this down to something like:

if theItem.Condition = Conditions.Red then
bPassFilter = true
else
bPassFilter = false
end if

Would be great if you could execute "scriptlets" like this and get the
resulting value of bPassFilter.

Is this possible, or can anyone suggest and alternative approach I should
use?

Thanks.
 
Awesome, I was wanting to implement something like VBA in one of my apps...
I was thinking about doing the exact same thing this guy did, but now, I
have assistance. =)

Thanks for the link...
-CJ

--- first article coming soon simple skinning in windows forms...
 
Back
Top