PortTypeCollection.Item Property (String)
.NET Framework (current version)
Gets the PortType specified by its name.
Assembly: System.Web.Services (in System.Web.Services.dll)
Parameters
- name
-
Type:
System.String
The name of the PortType returned.
| Exception | Condition |
|---|---|
| InvalidCastException | The value parameter cannot be explicitly cast to type PortType. |
Dim myServiceDescription As ServiceDescription = _ ServiceDescription.Read("MathService_VB.wsdl") Dim myPortTypeCollection As PortTypeCollection = _ myServiceDescription.PortTypes Dim noOfPortTypes As Integer = myServiceDescription.PortTypes.Count Console.WriteLine(ControlChars.Newline & _ "Total number of PortTypes: " & noOfPortTypes.ToString()) Dim myNewPortType As PortType = myPortTypeCollection("MathServiceSoap")
.NET Framework
Available since 1.1
Available since 1.1
Show: