PortTypeCollection::IndexOf Method (PortType^)
.NET Framework (current version)
Searches for the specified PortType and returns the zero-based index of the first occurrence within the collection.
Assembly: System.Web.Services (in System.Web.Services.dll)
Parameters
- portType
-
Type:
System.Web.Services.Description::PortType^
The PortType for which to search in the collection.
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" ]; // Get the index in the collection. int index = myPortTypeCollection->IndexOf( myNewPortType );
.NET Framework
Available since 1.1
Available since 1.1
Show: