PortTypeCollection.CopyTo Method
.NET Framework 2.0
Copies the entire PortTypeCollection to a one-dimensional array of type PortType, 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)
Assembly: System.Web.Services (in system.web.services.dll)
public void CopyTo ( PortType[] array, int index )
public function CopyTo ( array : PortType[], index : int )
Not applicable.
Parameters
- array
An array of type PortType serving as the destination for the copy action.
- index
The zero-based index at which to start placing the copied collection.
PortTypeCollection^ myPortTypeCollection; ServiceDescription^ myServiceDescription = ServiceDescription::Read( "MathService_CS.wsdl" ); myPortTypeCollection = myServiceDescription->PortTypes; int noOfPortTypes = myServiceDescription->PortTypes->Count; Console::WriteLine( "\nTotal number of PortTypes: {0}", myServiceDescription->PortTypes->Count ); // Copy the collection into an array. array<PortType^>^ myPortTypeArray = gcnew array<PortType^>(noOfPortTypes); myPortTypeCollection->CopyTo( myPortTypeArray, 0 ); // Display names of all PortTypes. for ( int i = 0; i < noOfPortTypes; i++ ) { Console::WriteLine( "PortType name: {0}", myPortTypeArray[ i ]->Name ); } myServiceDescription->Write( "MathService_New.wsdl" );
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: