PortTypeCollection::Item Property (String^)

 

Gets the PortType specified by its name.

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

public:
property PortType^ default[
	String^ name
] {
	PortType^ get(String^ name);
}

Parameters

name
Type: System::String^

The name of the PortType returned.

Property Value

Type: System.Web.Services.Description::PortType^

The name of the value parameter.

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
Return to top
Show: