#pragma warning disable SA1600
        void ILargeCollection.CopyTo(Array array, int index)
#pragma warning restore SA1600
        {
#if STRICT
            if (array == null)
            {
                throw new ArgumentNullException("dest");
            }
#else
            if (array == null)
            {
                throw new ArgumentNullException(nameof(array));
            }
#endif

#if STRICT
            if (index < 0)
            {
                throw new ArgumentOutOfRangeException("dstIndex", "Number was less than the array's lower bound in the first dimension.");
            }
#else
            if (index < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(index), "Number was less than the array's lower bound in the first dimension.");
            }
#endif

            if (index + Count > array.Length)
            {
                throw new ArgumentException("Destination array was not long enough. Check " + nameof(index) + " and length, and the array's lower bounds.");
            }

            ILargeCollection AsCollection = (ILargeCollection)Items;
            AsCollection.CopyTo(array, index);
        }
示例#2
0
        void ILargeCollection.CopyTo(Array array, int index)
        {
            if (array == null)
            {
                throw new ArgumentNullException("dest", "Value cannot be null.");
            }

            if (index < 0)
            {
                throw new ArgumentOutOfRangeException("dstIndex", "Number was less than the array's lower bound in the first dimension.");
            }

            if (index + Count > array.Length)
            {
                throw new ArgumentException("Destination array was not long enough. Check destIndex and length, and the array's lower bounds.");
            }

            ILargeCollection AsCollection = Items as ILargeCollection;

            AsCollection.CopyTo(array, index);
        }
示例#3
0
#pragma warning disable SA1600
        void ILargeCollection.CopyTo(Array array, int arrayIndex)
#pragma warning restore SA1600
        {
            if (array == null)
            {
                throw new ArgumentNullException(nameof(array), "Value cannot be null.");
            }

            if (arrayIndex < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(arrayIndex), "Number was less than the array's lower bound in the first dimension.");
            }

            if (arrayIndex + Count > array.Length)
            {
                throw new ArgumentException("Destination array was not long enough. Check " + nameof(arrayIndex) + " and length, and the array's lower bounds.");
            }

            ILargeCollection AsCollection = (ILargeCollection)Items;

            AsCollection.CopyTo(array, arrayIndex);
        }
示例#4
0
#pragma warning disable SA1600
        void ILargeCollection.CopyTo(Array array, int arrayIndex)
#pragma warning restore SA1600
        {
            if (array == null)
            {
                throw new ArgumentNullException(nameof(array));
            }

            if (arrayIndex < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(arrayIndex));
            }

            if (arrayIndex + Count > array.Length)
            {
                throw new ArgumentException();
            }

            ILargeCollection AsCollection = (ILargeCollection)Items;

            AsCollection.CopyTo(array, arrayIndex);
        }