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. |
ServiceDescription^ myServiceDescription = ServiceDescription::Read( "MathService_CS.wsdl" ); PortTypeCollection^ myPortTypeCollection = myServiceDescription->PortTypes; int noOfPortTypes = myServiceDescription->PortTypes->Count; Console::WriteLine( "\nTotal number of PortTypes: {0}", noOfPortTypes ); PortType^ myNewPortType = myPortTypeCollection[ "MathServiceSoap" ];
.NET Framework
Available since 1.1
Available since 1.1
Show: