ImportCollection.Item Property (Int32)

 

Gets or sets the value of an Import at the specified zero-based index.

Namespace:   System.Web.Services.Description
Assembly:  System.Web.Services (in System.Web.Services.dll)

Public Property Item (
	index As Integer
) As Import

Parameters

index
Type: System.Int32

The zero-based index of the Import whose value is modified or returned.

Property Value

Type: System.Web.Services.Description.Import

An Import.

The following example demonstrates the use of a zero-based index to iterate through the members of the ImportCollection.

' Get Import Collection.
Dim myImportCollection As ImportCollection = myServiceDescription.Imports
Console.WriteLine("Total Imports in the document = " + _
                  myServiceDescription.Imports.Count.ToString())
' Print 'Import' properties to console.
Dim i As Integer
For i = 0 To myImportCollection.Count - 1
   Console.WriteLine(ControlChars.Tab + _
                     "Import Namespace :{0} Import Location :{1} ", _
                     myImportCollection(i).Namespace, _
                     myImportCollection(i).Location)
Next i

.NET Framework
Available since 1.1
Return to top
Show: