Exemple #1
0
        public static object ToNativeArray(object value, RuntimeTypeHandle handle)
        {
            ArrayObject ary = null;

            if (value is ArrayObject)
            {
                ary = (ArrayObject)value;
            }
            else
            {
                ary = Convert.ToArray(value);
            }

            Hashtable elems = ary.elems;
            uint      n     = (uint)ary.length;

            object [] result = new object [n];
            for (uint i = 0; i < n; i++)
            {
                result [i] = elems [i];
            }

            return(result);
        }