Language

ServiceDescriptionFormatExtensionCollection.CopyTo(Object[], Int32) メソッド

定義

ターゲット配列の指定した 0 から始まるインデックスから始まる、 ServiceDescriptionFormatExtensionCollection 全体を ServiceDescriptionFormatExtension型の 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.")

適用対象