ToNativeArray() private method

private ToNativeArray ( Type elementType ) : Array
elementType System.Type
return System.Array
        public static object ToNativeArray(string elementTypename, object arrayObject)
        {
            Type elementType = GetType(elementTypename);

            if (elementType == null)
            {
                throw new JScriptException(JSError.TypeMismatch);
            }
            ArrayObject obj2 = arrayObject as ArrayObject;

            if (obj2 == null)
            {
                throw new JScriptException(JSError.TypeMismatch);
            }
            return(obj2.ToNativeArray(elementType));
        }