Exemple #1
0
        // ICorDebugArrayValue

        public static unsafe uint[] GetDimensions(this ICorDebugArrayValue corArray)
        {
            uint[] dimensions = new uint[corArray.GetRank()];

            fixed(uint *pDimensions = dimensions)
            corArray.GetDimensions((uint)dimensions.Length, new IntPtr(pDimensions));

            return(dimensions);
        }
Exemple #2
0
        public int[] GetDimensions()
        {
            Debug.Assert(Rank != 0);
            var dims = new uint[Rank];

            m_arrayVal.GetDimensions((uint)dims.Length, dims);

            int[] sdims = Array.ConvertAll(dims, delegate(uint u) { return((int)u); });
            return(sdims);
        }