microsoft / ClearScript

A library for adding scripting to .NET applications. Supports V8 (Windows, Linux, macOS) and JScript/VBScript (Windows).
https://microsoft.github.io/ClearScript/
MIT License
1.77k stars 148 forks source link

[VBScript] number of parameters #502

Closed Tor012 closed 1 year ago

Tor012 commented 1 year ago

Hello,

is there a way in VBScriptEngine to check how many parameters a script method has?

Function MethodA(p1, p2, p3, p4)
    ...
End Function

Function MethodB(p1, p2)
    ...
End Function
ClearScriptLib commented 1 year ago

Hi @Tor012,

is there a way in VBScriptEngine to check how many parameters a script method has?

Unfortunately, no. We are not aware of a way to check the parameter count of a VBScript function. There seems to be no way to do it in script code, nor is the parameter count exposed via IReflect.

Sorry!

Tor012 commented 1 year ago

OK, too bad. Thank you.