OperationCollection.CopyTo Method
.NET Framework 3.0
Copies the entire OperationCollection to a compatible one-dimensional array of type Operation, 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 ( Operation[] array, int index )
public function CopyTo ( array : Operation[], index : int )
Not applicable.
Parameters
- array
An array of type Operation serving as the destination for the copy action.
- index
The zero-based index at which to start placing the copied collection.
The following example demonstrates the use of the CopyTo method.
array<Operation^>^myOperationArray = gcnew array<Operation^>(myOperationCollection->Count); myOperationCollection->CopyTo( myOperationArray, 0 ); Console::WriteLine( "The operation(s) in the collection are :" ); for ( int i = 0; i < myOperationCollection->Count; i++ ) { Console::WriteLine( " {0}", myOperationArray[ i ]->Name ); }
Operation myOperationArray[] = new Operation[myOperationCollection.
get_Count()];
myOperationCollection.CopyTo(myOperationArray, 0);
Console.WriteLine("The operation(s) in the collection are :");
for (int i = 0; i < myOperationCollection.get_Count(); i++) {
Console.WriteLine(" " + myOperationArray[i].get_Name());
}
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: