cArray: Copy

Copy

Copies one Array to another Array and performs type casting as necessary.



 Public Sub Copy(
	  ByRef SourceArray As Variant,
	  ByRef DestinationArray As Variant,
	  ByVal Count As Long,
	  Optional ByVal AddressOfCopier As Long )

Parameters

SourceArray
[ByRef] Variant. The array from which to copy the elements.
DestinationArray
[ByRef] Variant. The array in which to place the elements.
Count
[ByVal] Long. The number of elements to copy.
AddressOfCopier
[ByVal] Optional. Long. A callback address to a method used to assign elements from the source array to the destination array.

Remarks

The AddressOfCopier method signature must be two parameters of ByRef for the datatypes of each of the arrays. The destination array element is the first parameter.

Example

This is an example of a callback method declaration.
 Public Sub CopyCallback(ByRef dst As String, ByRef src As MyClass)
     dst = src.Name
 End Sub
 

See Also

Project VBCorLib Overview Class cArray Overview cArray Properties cArray Methods Clear CopyEx