I have this Js functions :
function Add (a, b)
{ return a+b;}
function Substract (a, b)
{ return a-b;}
I know (heard) that I can activate those functions on c# code using the dynamic keyword.
Can I get a help ( or beginning of help) to the solution by simple sample ?
edit
If I have a webBrowser ( winform) – which can help me. ( sorry to add this now).
You need a javascript interpreter if you want to execute javascript code. The C#s dynamic keyword is pretty useless in this aspect. You may take a look at Javascript .NET or Jint if you are trying to execute those functions in .NET code.
Here’s an example with
Jint:Remark: what you have is not valid javascript. The
varkeyword cannot be used before function parameters. So you probably should start by fixing your code.