you are facing error while performing try parse, let’s understand how to resolve this issue.
double outVariable; double.TryParse(valueToBeEvaluated, out outVariable)
Basically TryParase takes two arguments and returns boolean “true” or “false“. What cause the above error comes?
Check your variable (we used valueToBeEvaluated in above code) whose value you wish to evaluate and make it explicit string format. Try your code you will have it working as below:
var valueToBeEvaluated=<some expression> double outVariable; double.TryParse(valueToBeEvaluated.ToString(), out outVariable)
That’s all you are good to go!!!