This documentation is archived and is not being maintained.
PortTypeCollection::IndexOf Method
Visual Studio 2010
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 );
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: