This project has moved. For the latest updates, please go here.

Calling C# functions with array parameters

Aug 14, 2013 at 7:59 AM
Hi,

Is there any way to pass one int array when calling a C# function from JScript

Thanks, Victor
Coordinator
Aug 14, 2013 at 10:34 PM
Not directly, but you can have your C# method take a Jurassic.Library.ArrayInstance and then convert that into an integer array. (This class represents a JavaScript array, which means it can contain elements of any type).
Aug 15, 2013 at 8:13 AM
Ok, I'll try it, thanks a lot for the answer and for the job done. It was really easy to integrate it in my application and have it running in less than an hour.

Is the JS 'arguments' function parameter supported? Are hash tables supported too?
Coordinator
Aug 15, 2013 at 8:15 PM
"arguments" is supported as per the spec. I'm not sure what you mean by "hash tables". Every object in JavaScript is effectively a hash table, so I guess the answer is yes. Is that what you meant?
Aug 16, 2013 at 5:24 AM
Well, I suppose it's part of my lack of javascript knowledge. I was directly extrapolating from other programming languages (e.g. C#) so I did not have into account the relation between dictionaries (key/value pairs) and object properties in javascript.

Thanks again.