ListBox::ObjectCollection::ICollection::CopyTo Method (Array^, Int32)

 

This API supports the product infrastructure and is not intended to be used directly from your code.

Copies the elements of the collection to an array, starting at a particular array index.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

private:
virtual void CopyTo(
	Array^ destination,
	int index
) sealed = ICollection::CopyTo

Parameters

destination
Type: System::Array^

The one-dimensional array that is the destination of the elements copied from ICollection. The array must have zero-based indexing.

index
Type: System::Int32

The zero-based index in the array at which copying begins.

Exception Condition
ArrayTypeMismatchException

The array type is not compatible with the items in the ListBox::ObjectCollection.

This member is an explicit interface member implementation. It can be used only when the ListBox::ObjectCollection instance is cast to an ICollection interface.

.NET Framework
Available since 1.1
Return to top
Show: