ToolboxItemCollection.CopyTo Method (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(
	ToolboxItem[] array,
	int index
)

Parameters

array
Type: 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.
ToolboxItem[] items = new ToolboxItem[collection.Count];
collection.CopyTo( items, 0 );

.NET Framework
Available since 1.1
Return to top
Show: