vendredi 18 décembre 2015

String evaluation in IF condition

Lets say i have

int a = 1;
int b = 2;
string exp = "b > a";

and i want to evaluate the string expression with those variables

if(exp.SomeKindOfParseOrCast())
{
   //here be magic
}

Is it possible in any simple way?

Aucun commentaire:

Enregistrer un commentaire