Version: 2018.3 (switch to 2019.1)
LanguageEnglish
  • C#

ExpressionEvaluator.Evaluate<T>(string)

Parameters

expressionA string containing a mathematical expression (e.g. "4 + 3").

Returns

void The result of the evaluation (0 for invalid expressions).

Description

Evaluates a math expression and returns the result as a float or int.

If the expression is invalid or cannot be evaluated properly, then the result will be 0.

Did you find this page useful? Please give it a rating: