How to pass an array

Jun 27, 2011 at 1:22 AM

I like to call engine.SetParameter() and pass an array.
I cannot find how to create a valid JavaScript array in C#.

Thanks.

Coordinator
Jun 28, 2011 at 4:45 AM

Try:

scriptEngine.Array.New(new object[] { 1, 2, 3 })

The element types must be supported, see http://jurassic.codeplex.com/wikipage?title=Supported%20types&referringTitle=Documentation

Jun 28, 2011 at 4:51 AM

Thanks. it is working.