Visual Basic, Visual Studio 2013
My question is how change this code to read any function that was wrote in textbox that the program did not pay conversion error.
Public Function f(Byval x As Double) As Double
Return x * x + 2 * x <- how read this function from textbox ?
End Function
I try other one and did not work:
Public Function f(x) As Double
f = TextBox1.Text
End Function
`sc.Language = "VBScript"` `Dim expression As String = "1 + 2 * 7"` `Dim result As Double = sc.Eval(expression)` `f = result` – Pit998 Apr 18 '14 at 05:16