I want to execute a javascript code from c# using DLR.
So I wrote a simple code using c#
and Jint :
var script = @"
function show( )
{
return parseInt('123asd'); //in js it's 123
};
return show();";
var result = new JintEngine().Run(script);
Console.WriteLine(result);
parseInt('123asd')
in javascript is : 123
But the result I get is :
Maybe I don't see the whole picture, but if a programmer on the other side of the world sends me his script file, I (and him) expect the result to be consistent!
If I was mistaken, in what scenario would I use running other code on .Net? (I will have to be very very suspicious for every line of code...)