jeudi 6 juillet 2017

use expression tree to evaluate properties of a generic class

i have to evaluate a formula which contains certain expressions, say for eg:"column1 * column3". These column names are dynamic and are generated only at run time. I have the class objects with me having these column names. The expressions can have any basic arithmetic operators.

I think this could be approached with Expression tree in c#. Would that be the best approach. If so could someone provide me some assistance on how to approach this because i could not find any good examples on Expression trees. Or whether it could/should be done using reflections.

Thanks





Aucun commentaire:

Enregistrer un commentaire