BindingContext.ICollection.CopyTo(Array, Int32) Method

Definition

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

C#
void ICollection.CopyTo(Array ar, int index);

Parameters

ar
Array

An Array to copy into.

index
Int32

The collection index to begin copying from.

Implements

Examples

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

Applies to

Produkt Verzie
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10