語言

ServiceDescriptionCollection.Item[] 屬性

定義

取得或設定 ServiceDescription 由傳入參數指定的實例。

多載

名稱 Description
Item[Int32]

取得或設定 a ServiceDescription 在指定的零基索引值。

Item[String]

會根據其ServiceDescription性質獲得 指定。TargetNamespace

Item[Int32]

取得或設定 a ServiceDescription 在指定的零基索引值。

public:
 property System::Web::Services::Description::ServiceDescription ^ default[int] { System::Web::Services::Description::ServiceDescription ^ get(int index); void set(int index, System::Web::Services::Description::ServiceDescription ^ value); };
public System.Web.Services.Description.ServiceDescription this[int index] { get; set; }
member this.Item(int) : System.Web.Services.Description.ServiceDescription with get, set
Default Public Property Item(index As Integer) As ServiceDescription

參數

index
Int32

其值為零的索引 ServiceDescription 會被修改或回傳。

屬性值

a 在指定索引處的 ServiceDescription 值。

範例

// Display element properties in the collection using 
// the Item property.
for ( int i = 0; i < myCollection->Count; i++ )
   Console::WriteLine( myCollection[ i ]->TargetNamespace );
// Display element properties in collection using 'Item' property.
for(int i=0; i<myCollection.Count; i++)
{
   Console.WriteLine(myCollection[i].TargetNamespace);
}
' Display element properties in collection using 'Item' property.
Dim i As Integer
For i = 0 To myCollection.Count - 1
   Console.WriteLine(myCollection(i).TargetNamespace)
Next i

適用於

Item[String]

會根據其ServiceDescription性質獲得 指定。TargetNamespace

public:
 property System::Web::Services::Description::ServiceDescription ^ default[System::String ^] { System::Web::Services::Description::ServiceDescription ^ get(System::String ^ ns); };
public System.Web.Services.Description.ServiceDescription this[string ns] { get; }
member this.Item(string) : System.Web.Services.Description.ServiceDescription
Default Public ReadOnly Property Item(ns As String) As ServiceDescription

參數

ns
String

回歸者的 ServiceDescription 命名空間。

屬性值

A ServiceDescription 由其命名空間特性指定。

範例

// Get a ServiceDescription in the collection using 
// the Item property.
ServiceDescription^ myServiceDescription = myCollection[ "http://tempuri1.org/" ];
// Get a 'ServiceDescription' object in collection using 'Item'.
ServiceDescription myServiceDescription = myCollection["http://tempuri1.org/"];
' Get a 'ServiceDescription' object in collection using 'Item'.
Dim myServiceDescription As ServiceDescription = myCollection("http://tempuri1.org/")

適用於