ערוך

שתף באמצעות


ServiceDescriptionFormatExtensionCollection.CopyTo(Object[], Int32) Method

Definition

Copies the entire ServiceDescriptionFormatExtensionCollection into a one-dimensional array of type ServiceDescriptionFormatExtension, starting at the specified zero-based index of the target array.

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[]

An array of type ServiceDescriptionFormatExtension serving as the destination of the copy action.

index
Int32

The zero-based index at which to start placing the copied collection.

Examples

// 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.")

Applies to