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

New Post: javascript blob

$
0
0
Suppose you've defined a JavaScript function like this:
engine.Execute("function myFunction(a, b, c) { return a * b + c; }");
Here are a few ways to execute it from the host and print out the return value:
Console.WriteLine(engine.Script.myFunction(1, 2, 3));
Console.WriteLine(engine.Script["myFunction"](4, 5, 6));
Console.WriteLine(engine.Invoke("myFunction", newobject[] { 7, 8, 9 }));
Thanks!

Viewing all articles
Browse latest Browse all 2297

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>