Example #1
0
        /// <summary>
        /// Gets a copy of the key's array value. Changing the values of this array does not affect the owning message.
        /// Call ::AsXArray(alteredArray) to set new values.
        /// </summary>
        /// <returns>Returns a *copy* of the key's array.</returns>
        public virtual double[] AsDoubleArray()
        {
            AssertTypeSafe(GribValueType.DoubleArray);

            SizeT sz = 0;

            GribApiProxy.GribGetSize(_handle, Key, ref sz);

            double[] values = new double[sz];
            GribApiProxy.GribGetDoubleArray(_handle, Key, values, ref sz);

            return(values);
        }