(0) exportieren Drucken
Alle erweitern

PortCollection.Item-Eigenschaft (Int32)

Ruft den Wert eines Port am angegebenen nullbasierten Index ab oder legt diesen fest.

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

public Port this [
	int index
] { get; set; }
/** @property */
public Port get_Item (int index)

/** @property */
public void set_Item (int index, Port value)

Nicht zutreffend.

Parameter

index

Der nullbasierte Index des Port, dessen Wert geändert oder zurückgegeben wird.

Eigenschaftenwert

Ein Port.

Service myService;
PortCollection myPortCollection;

ServiceDescription myServiceDescription =
   ServiceDescription.Read("MathServiceItem_cs.wsdl");

Console.WriteLine("Total number of services : "
   + myServiceDescription.Services.Count);

for(int i=0; i < myServiceDescription.Services.Count; ++i)
{
   myService = myServiceDescription.Services[i];
   Console.WriteLine("Name : " + myService.Name);

   myPortCollection = myService.Ports;

   // Create an array of ports.
   Console.WriteLine("\nPort collection :");
   for(int i1=0 ; i1 < myService.Ports.Count ; ++i1)
   {
      Console.WriteLine("Port[" + i1+"] : " +
         myPortCollection[i1].Name);
   }

Service myService;
PortCollection myPortCollection;

ServiceDescription myServiceDescription = 
    ServiceDescription.Read("MathServiceItem_jsl.wsdl");

Console.WriteLine("Total number of services : " 
    + myServiceDescription.get_Services().get_Count());

for (int i = 0; i < myServiceDescription.get_Services().
    get_Count(); ++i) {
    myService = myServiceDescription.get_Services().get_Item(i);
    Console.WriteLine("Name : " + myService.get_Name());
    myPortCollection = myService.get_Ports();

    // Create an array of ports.
    Console.WriteLine("\nPort collection :");
    for (int i1 = 0; i1 < myService.get_Ports().get_Count();
        ++i1) {
        Console.WriteLine("Port[" + i1 + "] : " 
            + myPortCollection.get_Item(i1).get_Name());
    }

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

Microsoft .NET Framework 3.0 wird unter Windows Vista, Microsoft Windows XP SP2 und Windows Server 2003 SP1 unterstützt.

.NET Framework

Unterstützt in: 3.0, 2.0, 1.1, 1.0
Anzeigen:
© 2014 Microsoft