title: C# Allow user to enter conditional rules
body: <p>I write code in isolation, that is I work for myself. I need some advice on how you might implement the following functionality or if there are some tools that already exist to help make this task easier to accomplish.</p>
  
  <p>I have a scenario (C# application) in which I would like the user to be able to enter conditional rules which will then be used elsewhere in the program for various calculations.</p>
  
  <p>As a simple example let's say we have a TimeRequiredForJob property and we need to calculate this in the program based upon the users rules. A simple rule might be</p>
  
  <p>TimeRequiredForJob = 200 Balloons multiplied by 5 min each, or
  TimeRequiredForJob = 20% of HoursInAfternoon</p>
  
  <p>I am guessing its pretty hard to see what I am looking for so maybe the following image will help:
  <img src="https://i.stack.imgur.com/uJBU9.png" alt="DevExpress XtraGrid Filter Example"></p>
  
  <p>This is from DevExpress XtraGrid and it allows a user to filter data displayed in the grid based upon the users custom filter rules. I would like to implement something similar but be able to save the rules to a database and use those rules later in the application.</p>
  
  <p>Any suggestions or tips welcome.</p>
  
  <p>[Late Edit]</p>
  
  <p>Actually I am getting some good information from <a href="https://stackoverflow.com/questions/1644146/user-defined-formulas-in-c">this question</a> but any additional information will be appreciated.</p>