OperationCollection.CopyTo Method (Operation(), Int32)

 

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)

Public Sub CopyTo (
	array As Operation(),
	index As Integer
)

Parameters

array
Type: System.Web.Services.Description.Operation()

An array of type Operation serving as the destination for the copy action.

index
Type: System.Int32

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

The following example demonstrates the use of the CopyTo method.

Dim myOperationArray(myOperationCollection.Count) As Operation
myOperationCollection.CopyTo(myOperationArray, 0)
Console.WriteLine("The operation(s) in the collection are :")
Dim i As Integer
For i = 0 To myOperationCollection.Count - 1
   Console.WriteLine(" " + myOperationArray(i).Name)
Next i

.NET Framework
Available since 1.1
Return to top
Show: