ServiceDescriptionFormatExtensionCollection.CopyTo メソッド
ServiceDescriptionFormatExtensionCollection 全体を ServiceDescriptionFormatExtension 型の 1 次元配列にコピーします。コピー操作は、コピー先の配列の指定した 0 から始まるインデックス番号から始まります。
Public Sub CopyTo( _
ByVal array() As Object, _ ByVal index As Integer _)
[C#]
public void CopyTo(object[] array,intindex);
[C++]
public: void CopyTo(Object* array __gc[],intindex);
[JScript]
public function CopyTo(
array : Object[],index : int);
パラメータ
- array
コピー アクションのコピー先として使用する ServiceDescriptionFormatExtension 型の配列。 - index
コピーされたコレクションの貼り付け開始位置を示す、0 から始まるインデックス番号。
使用例
' 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.")
[C#]
// 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.");
[C++]
// Copy elements of collection to an Object array.
Object* myObjectArray2[] = new Object*[myCollection->Count];
myCollection->CopyTo(myObjectArray2, 0);
Console::WriteLine(S"Collection elements are copied to an object array.");
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
ServiceDescriptionFormatExtensionCollection クラス | ServiceDescriptionFormatExtensionCollection メンバ | System.Web.Services.Description 名前空間