How to perform this task?
int Amount, x=1000,y=200;
string BasedOn="x*12/100+y*5/100";
//In place of x and y in BasedOn I want to replace with x,y values like (1000*12%+200*5%)
//and the calculated result(130) should be assigned to Amount variable
For now, I split the BasedOn string
string[][] strings = BasedOn
.Split(new char[] { '+' }, StringSplitOptions.RemoveEmptyEntries)
.Select(w => w.Split('*').ToArray())
.ToArray();
What to do next? Please help me.