RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DynamicArray::CopyRange Method (DynamicArray<T> &, int, int)

Copies a range of the contents of a DynamicArray within a specified range.

Pascal
function CopyRange(startIndex: Integer; count: Integer): DynamicArray<T>;
procedure CopyRange(var dst: DynamicArray<T>; startIndex: Integer; count: Integer);
C++
DynamicArray<T> CopyRange(int startIndex, int count) const;
void CopyRange(DynamicArray<T> & dst, int startIndex, int count) const;

Use the System::DynamicArray::CopyRange method to copy a subrange of a dynamic array. The System::DynamicArray::CopyRange method is similar to the Copy method except that you can specify the startIndex and the number of items to copy from the source object. The size of the destination array will be truncated or expanded to accommodate what has been copied. 

newArray = array.System::DynamicArray::CopyRange(3, 5); 

 

Copy

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!