Esempio n. 1
0
        public ElementType GetArrayElementType()
        {
            if (!IsArray)
            {
                throw new InvalidOperationException("Value is not an array.");
            }

            ElementType type;

            ComArrayValue.GetElementType(out type);
            return(type);
        }
Esempio n. 2
0
        public uint[] GetArrayDimensions()
        {
            if (!IsArray)
            {
                throw new InvalidOperationException("Value is not an array.");
            }

            if (ElementType == Wrappers.ElementType.SzArray)
            {
                return new uint[1] {
                           GetArrayElementCount()
                }
            }
            ;

            uint rank = 0;

            ComArrayValue.GetRank(out rank);
            uint[] dimensions = new uint[rank];
            ComArrayValue.GetDimensions(rank, dimensions);
            return(dimensions);
        }