ServiceDescriptionFormatExtensionCollection.CopyTo(Object[], Int32) Methode

Definitie

Kopieert het hele ServiceDescriptionFormatExtensionCollection naar een eendimensionale matrix van het type ServiceDescriptionFormatExtension, beginnend bij de opgegeven op nul gebaseerde index van de doelmatrix.

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

Parameters

array
Object[]

Een matrix van het type ServiceDescriptionFormatExtension dat fungeert als de bestemming van de kopieeractie.

index
Int32

De op nul gebaseerde index waarop de gekopieerde verzameling moet worden geplaatst.

Voorbeelden

// Copy elements of collection to an Object array.
array<Object^>^myObjectArray2 = gcnew array<Object^>(myCollection->Count);
myCollection->CopyTo( myObjectArray2, 0 );
Console::WriteLine( "Collection elements are copied to an object array." );
// Copy elements of collection to an Object array.
Object[] myObjectArray2 = new Object[myCollection.Count];
myCollection.CopyTo(myObjectArray2,0);
Console.WriteLine("Collection elements are copied to an object array.");
' Copy elements of collection to an Object array.
Dim myObjectArray2(myCollection.Count -1 ) As Object
myCollection.CopyTo(myObjectArray2, 0)
Console.WriteLine("Collection elements are copied to an object array.")

Van toepassing op