ToolboxItemCollection::CopyTo Method (array<ToolboxItem^>^, Int32)

 

Copies the collection to the specified array beginning with the specified destination index.

Namespace:   System.Drawing.Design
Assembly:  System.Drawing (in System.Drawing.dll)

public:
void CopyTo(
	array<ToolboxItem^>^ array,
	int index
)

Parameters

array
Type: array<System.Drawing.Design::ToolboxItem^>^

The array to copy to.

index
Type: System::Int32

The index to begin copying to.

The following code example demonstrates using the CopyTo method of a ToolboxItemCollection.

// Copy the ToolboxItemCollection to the specified array.
array<ToolboxItem^>^items = gcnew array<ToolboxItem^>(collection->Count);
collection->CopyTo( items, 0 );

.NET Framework
Available since 1.1
Return to top
Show: