Is there a function in VB.NET which can evaluate an arithematic string?
e.g., When passed 4+5-2 it should return the result (7).
Is there a function in VB.NET which can evaluate an arithematic string?
e.g., When passed 4+5-2 it should return the result (7).
Use DataTable:
Dim equation As String = "4+5-2"
Dim result = New DataTable().Compute(equation, Nothing)
Result is 7.