Microsoft Script Control Help

jackmanbrace

New member
Joined
Feb 15, 2008
Messages
3
Programming Experience
Beginner
this wont work in vb.net!

i want it to evaluate e^(-sin(20))

Dim strDBA As New MSScriptControl.ScriptControl()
strDBA.Language = "VBScript"

Dim dbResult As Double = strDBA.Eval("e^(-sin(20))")


How would I get this to work?
 
VBScript Exp function returns e raised to a power. exp(-sin(20))
 
I cant use exp

all my functions are dynamic so i need a way to change it from a string into a mathematical expression that could be evaluated

example: change the string "e^(-sin(x))", where user input for x is 20, into Math.Exp(-sin(20)) and then evaulate it and come out with an answer

any way to do that?
 
Last edited:
replace "e^" with "exp"
 
Back
Top