I'm working on a project where the user needs to have the ability to create a formula in a WPF app.
The formula has to be made from some properties.
Let's say we have properties:
public decimal? Prop1 { get; set; }
public decimal? Prop2 { get; set; }
public decimal? Prop3 { get; set; }
Now, let's say we have a TextBox where the user has to be able to input only those properties and in between of the there needs to be some of the operators:
+, -, /, *.
I got the part where the user can only input those values properties and operators…
But my problem is how can I save that formula to the SQL database (lets say Prop1 * Prop2), how can I get the formula from database and make it read the values from the and basically "do the math…"
decimal? x = MyFormula;
I know the question is difficult, and so is my description of my it… Please feel free to ask for more detail if needed, and I'll try to explain it.