I've almost accomplished getting method parameter name and values.
here is output as expected:
writes: the variable name.
I'm using using vb.net 2005 /Vista/Microsoft Script Control 1.0
VB.NET:
TestScripting("I hope this works")
VB.NET:
Public Sub TestScripting(ByVal A As String)
Dim oscript As New MSScriptControl.ScriptControl
oscript.Language = "VBScript"
For Each oParm As ParameterInfo In MethodBase.GetCurrentMethod.GetParameters
oscript.AddObject("MyTestStmt", A, True)
Debug.WriteLine(oscript.Eval("MyTestStmt"))
Next oParm
End Sub
However, This does not work.I hope this works
VB.NET:
For Each oParm ...
oscript.AddObject("MyTestStmt", oParm.Name, True)
Debug.WriteLine(oscript.Eval("MyTestStmt"))
Next oParm
writes: the variable name.
What am I doing wrong?
I'm using using vb.net 2005 /Vista/Microsoft Script Control 1.0