public static T[] BlockCopy<T>(
this T[] array,
int startIndex,
int length
)
<ExtensionAttribute>
Public Shared Function BlockCopy(Of T) (
array As T(),
startIndex As Integer,
length As Integer
) As T()
public:
[ExtensionAttribute]
generic<typename T>
static array<T>^ BlockCopy(
array<T>^ array,
int startIndex,
int length
)
Returned array will be extended as needed to make it the specified length, but it will never be less than the source array length - startIndex.
If an existing array of primitives is already available, using the BlockCopy(Array, Int32, Array, Int32, Int32) directly instead of this extension method may be optimal since this method always allocates a new return array. Unlike BlockCopy(Array, Int32, Array, Int32, Int32), however, this function also works with non-primitive types.
ArgumentOutOfRangeException | startIndex is outside the range of valid indexes for the source array -or- length is less than 0. |