ImportCollection.CopyTo Method (Import(), Int32)
.NET Framework (current version)
Copies the entire ImportCollection to a compatible one-dimensional array of type Import, starting at the specified zero-based index of the target array.
Assembly: System.Web.Services (in System.Web.Services.dll)
Parameters
- array
-
Type:
System.Web.Services.Description.Import()
An array of type Import serving as the destination of 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 myImports(myServiceDescription.Imports.Count - 1) As Import ' Copy 'ImportCollection' to an array. myServiceDescription.Imports.CopyTo(myImports, 0) Console.WriteLine("Imports that are copied to Importarray ...") Dim j As Integer For j = 0 To myImports.Length - 1 Console.WriteLine(ControlChars.Tab + _ "Import Namespace :{0} Import Location :{1} ", _ myImports(j).Namespace, myImports(j).Location) Next j
.NET Framework
Available since 1.1
Available since 1.1
Show: