DesignerActionListCollection.CopyTo Method (DesignerActionList[], Int32)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Copies the elements of the current collection into the supplied array, starting at the specified array index.

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

public void CopyTo(
	DesignerActionList[] array,
	int index


Type: System.ComponentModel.Design.DesignerActionList[]

The one-dimensional array of type DesignerActionList that is the destination of the elements copied from the current collection. The array must have zero-based indexing.

Type: System.Int32

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

Exception Condition

array is null.


index is less than 0.


array is multidimensional.


The number of elements in the current collection is greater than the available space from index to the end of the destination array.


A problem occurred casting the elements of the current collection to the type of the destination array, perhaps as the result of a failed downcast.

If the CopyTo method throws an exception while copying, the state of the destination array is undefined. For example, if an ArgumentException or InvalidCastException occurs, the destination array may be left in a partially filled state.


for full access to system resources. Demand values: LinkDemand, InheritanceDemand. Associated state:

.NET Framework
Available since 2.0
Return to top