Is there a way in c# where I can get the result of the formula inside the string with multiple values and with Add, Subtract, Max, Min, Average, Mean, Median operators where Operands in any sub-expression can be more than 2?
Something like
var result = Eval("Max(1,2,3, Avg(4,5,6,7), 9+10+9.9, 11/12)")
or any other way (without splitting the string or evaluating each operation separately)?
I tried to search but did not get any complete solution. I found that RegEx
, DataTable.Computer
or Math library do not support operations with more than two values.