BindingContext.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 into a specified array, starting at the collection index.

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

void ICollection.CopyTo(
	Array ar,
	int index
)

Parameters

ar
Type: System.Array

An Array to copy into.

index
Type: System.Int32

The collection index to begin copying from.

private void CopyToArray(){
   // Declare the array.
   object [] myArray = new object [100];
   ((ICollection)this.BindingContext).CopyTo(myArray, 0);
}       

.NET Framework
Available since 1.1
Return to top
Show: