/// <summary>
        /// Read multi-dimensional array
        /// </summary>
        private Array ReadMDArray(Type type)
        {
            Type eleType = type.GetElementType();

            int[] lengths = new int[type.GetArrayRank()];

            for (int i = 0; i < lengths.Length; i++)
            {
                lengths[i] = ReadVarInt();
            }

            Array arr = Array.CreateInstance(eleType, lengths);

            for (int i = 0; i < arr.Length; i++)
            {
                arr.SetValue(Read(eleType), ArrayUtils.ArrayIndexToIndices(arr, i));
            }

            return(arr);
        }