title: Is it possible to create an expression tree for dynamic if statements?
body: <p>I have a situtaiton where I read the bussiness logic and replace the variables with actual values and then I need to evaluate it to get result. I am currently using bcParser to do it and it works just fine for all the logic which is written like excel format. </p>
  
  <p>The curve ball thrown at me is that, the if condition will not be like excel <code>if(cond, true, false)</code> rather it will be like C# where the <code>if (cond) { true; } else { false;}</code>, this makes more sense and easy to maintain. Since I replace all the variables with value before hand, all I have to do is evaluate it. Currently I am solving this problem by exporting the logic to c# methods and using reflection I am evaluating it and it also works. </p>
  
  <p>I am wondering is there any other option, I do not want to write code for each if condition and would like to evaluate it on the run time. I was wondering if I should able to create a token parser of some sort and call C# native expression evalution and perform the calculation. I haven't gone into understanding expresion trees, it seems it is possible with that approach. before I go there, I would like to know is it possible at all?
  Thanks,</p>