Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Call known method by name

0
0
Per this thread here:
https://clearscript.codeplex.com/discussions/467402

I should be able to do
ScriptEngine.Script["MyMethod"](arg1, arg2);
But I get exception:
Cannot apply indexing with [] to an expression of type 'System.Dynamic.DynamicObject'
Per this thread here:
https://clearscript.codeplex.com/discussions/537917

the extension method blows up in the same way.
var del = (Delegate)host.func<object>(args.Length, engine.Script[name]);
engine.Script[name] is not allowed.

Am i missing something basic??

Viewing all articles
Browse latest Browse all 2297