Hey
I have an array of MyType s in an object similar to the setup below, I want to be able to set the value of an index on myObject as it is, I cannot change the declaration of MyFunction.
/*...*/
MyType [] myTypedArray = new MyType[100];
MyFunction(myTypedArray);
/*...*/
function MyFunction(object myObject)
{
myObject[0] = new MyType();
}
This, obviously, doesn't work but I cannot figure out how to get it to work. I cannot cannot use templates/generics it has to be all using reflection.
Note that I have to have myObjectArray, initially, as an "object" as this is how I receive it. I cannot do the initial cast to a object[]. I have tried casting myObjectArray to object[] and it doesn't work.
I also do not have access to MyType as a static type, only runtime.
Any advice would be great, thanks.