Mono.Debugger.Languages.TargetArrayObject.GetLength C# (CSharp) Method

GetLength() protected method

protected GetLength ( TargetMemoryAccess target ) : int
target TargetMemoryAccess
return int
        protected int GetLength(TargetMemoryAccess target)
        {
            if (!GetArrayBounds (target))
                throw new LocationInvalidException ();

            if (!bounds.IsMultiDimensional)
                return bounds.Length;

            int length = 0;
            for (int i = 0; i < Rank; i++)
                length *= bounds.UpperBounds [i] - bounds.LowerBounds [i] + 1;
            return length;
        }