The code converts a JScript Array object to a typed array (a System.Array).
This is accomplished by allocating enough memory to store a copy of the typed array and by copying the elements of the JScript array into the typed array.
Consequently, modifications to the typed array will not be reflected in the JScript array unless the code copies the typed array back to the JScript array after making the modifications.
To correct this error
Use explicit type conversion to convert the JScript array to the typed array.