ServiceDescriptionCollection.CopyTo(ServiceDescription[], Int32) Method

Definition

Copies the entire ServiceDescriptionCollection to a one-dimensional array of type ServiceDescription, starting at the specified zero-based index of the target array.

C#
public void CopyTo(System.Web.Services.Description.ServiceDescription[] array, int index);

Parameters

array
ServiceDescription[]

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

index
Int32

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

Examples

C#
ServiceDescription[] myArray = new ServiceDescription[myCollection.Count];
// Copy the collection to a 'ServiceDescription' array.
myCollection.CopyTo(myArray,0);
for(int i=0; i<myArray.Length; i++)
{
   Console.WriteLine("Name of element in array: " +  myArray[i].Name);
}

Applies to

Proizvod Verzije
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)