ServiceDescriptionFormatExtensionCollection.CopyTo(Object[], Int32) 메서드

정의

대상 배열의 지정된 인덱스(0부터 시작)에서 시작하여 전체 ServiceDescriptionFormatExtensionCollectionServiceDescriptionFormatExtension 형식의 1차원 배열에 복사합니다.

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)

매개 변수

array
Object[]

복사될 대상인 ServiceDescriptionFormatExtension 형식의 배열입니다.

index
Int32

복사된 컬렉션을 배치하기 시작할 인덱스(0부터 시작)입니다.

예제

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

적용 대상