Ejemplo n.º 1
0
        /// <summary>
        ///     Copies a range of elements from an array starting at the first element and pastes them into another array starting
        ///     at
        ///     the first element. The length is specified as a 32-bit integer.
        /// </summary>
        /// <exception cref="ArgumentNullException">The source array can not be null.</exception>
        /// <exception cref="ArgumentNullException">The Destination array can not be null.</exception>
        /// <param name="sourceArray">The array that contains the data to copy.</param>
        /// <param name="destinationArray">The array that receives the data.</param>
        /// <param name="length">A 32-bit integer that represents the number of elements to copy.</param>
        public static void Copy( this Array sourceArray, Array destinationArray, Int32 length )
        {
            sourceArray.ThrowIfNull( nameof( sourceArray ) );
            destinationArray.ThrowIfNull( nameof( destinationArray ) );

            Array.Copy( sourceArray, destinationArray, length );
        }