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)

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

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.
      array<Object^>^ myArray = gcnew array<Object^>(100);
      ( (ICollection^)(this->BindingContext) )->CopyTo( myArray, 0 );
   }

.NET Framework
Available since 1.1
Return to top
Show: