This documentation is archived and is not being maintained.
ServiceDescriptionFormatExtensionCollection.CopyTo Method
.NET Framework 1.1
Copies the entire ServiceDescriptionFormatExtensionCollection into a one-dimensional array of type ServiceDescriptionFormatExtension, starting at the specified zero-based index of the target array.
[Visual Basic] Public Sub CopyTo( _ ByVal array() As Object, _ ByVal index As Integer _ ) [C#] public void CopyTo( object[] array, int index ); [C++] public: void CopyTo( Object* array __gc[], int index ); [JScript] public function CopyTo( array : Object[], index : int );
Parameters
- array
- An array of type ServiceDescriptionFormatExtension serving as the destination of the copy action.
- index
- The zero-based index at which to start placing the copied collection.
Example
[Visual Basic] ' 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] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also
ServiceDescriptionFormatExtensionCollection Class | ServiceDescriptionFormatExtensionCollection Members | System.Web.Services.Description Namespace
Show: