This project has moved and is read-only. For the latest updates, please go here.

Calling C# functions with array parameters

Aug 14, 2013 at 8:59 AM

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

Thanks, Victor
Aug 14, 2013 at 11: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 9: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?
Aug 15, 2013 at 9: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 6: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.