ServiceDescriptionFormatExtensionCollection::CopyTo Method (array<Object^>^, Int32)

 

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

Namespace:   System.Web.Services.Description
Assembly:  System.Web.Services (in System.Web.Services.dll)

public:
void CopyTo(
	array<Object^>^ array,
	int index
)

Parameters

array
Type: array<System::Object^>^

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

index
Type: System::Int32

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

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

.NET Framework
Available since 1.1
Return to top
Show: