PortCollection.Item Property (Int32)
.NET Framework (current version)
Gets or sets the value of a Port at the specified zero-based index.
Assembly: System.Web.Services (in System.Web.Services.dll)
Parameters
- index
-
Type:
System.Int32
The zero-based index of the Port whose value is modified or returned.
Property Value
Type: System.Web.Services.Description.PortThe value of a port at the specified index.
Dim myService As Service Dim myPortCollection As PortCollection Dim myServiceDescription As ServiceDescription = _ ServiceDescription.Read("MathServiceItem_vb.wsdl") Console.WriteLine("Total number of services : " & _ myServiceDescription.Services.Count.ToString) Dim i As Integer For i = 0 to myServiceDescription.Services.Count - 1 myService = myServiceDescription.Services(i) Console.WriteLine("Name : " & myService.Name) myPortCollection = myService.Ports ' Create an array of ports. Console.WriteLine(ControlChars.NewLine & "Port collection :") Dim i1 As Integer For i1 = 0 to myService.Ports.Count - 1 Console.WriteLine("Port[" & i1.ToString & "] : " & _ myPortCollection(i1).Name) Next
.NET Framework
Available since 1.1
Available since 1.1
Show: