Redigera

Dela via


DesignerActionListCollection.CopyTo(DesignerActionList[], Int32) Method

Definition

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

public:
 void CopyTo(cli::array <System::ComponentModel::Design::DesignerActionList ^> ^ array, int index);
public void CopyTo (System.ComponentModel.Design.DesignerActionList[] array, int index);
public void CopyTo (System.ComponentModel.Design.DesignerActionList?[] array, int index);
member this.CopyTo : System.ComponentModel.Design.DesignerActionList[] * int -> unit
Public Sub CopyTo (array As DesignerActionList(), index As Integer)

Parameters

array
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.

index
Int32

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

Exceptions

array is null.

index is less than 0.

array is multidimensional.

-or-

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.

Remarks

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.

Applies to

See also