all groups > dotnet vsa > august 2003 >
You're in the

dotnet vsa

group:

eval JSCript.NET


eval JSCript.NET CGuy
8/1/2003 1:40:24 PM
dotnet vsa:
Hi,

I have a requirement of using the JScript.NET eval method in my C# code.
Currently, I have a .js file which defines a class and one method that does
the eval and I have compiled this to a dll and is being used in my C# code.
I would like to use Vsa to do this so that I can do it in my C# code
directly. Could some one tell me how do I do this C#?

CGuy

Re: eval JSCript.NET bruce barker
8/1/2003 3:47:19 PM
vsa has no c# compiler, so you would be back to jsscript anyway. also using
vsa requires a compile of the code, then adding the compiled code to your
memory space. unless you use a seperate domain for the eval code, and unload
it after every call you will lose memory. this would also be expensive.

the jscript eval actually calls the jscript interpter not the clr to run the
code.

if you just want to build the jscript eval class at runtime, your in luck.
jscript is the only native clr language (no system required), so you can
compile and load the class at runtime. but I don't see the advantage of this
over the dll.


-- bruce (sqlwork.com)



[quoted text, click to view]

Re: eval JSCript.NET CGuy
8/1/2003 6:55:20 PM
Thanks Bruce. I guess, I'll go ahead with the current DLL approach.

CGuy

[quoted text, click to view]

AddThis Social Bookmark Button