共用方式為


ServiceDescriptionCollection.Item[] 屬性

定義

取得或設定傳入參數所指定的 ServiceDescription 執行個體。

多載

Item[Int32]

取得或設定 ServiceDescription 的值,於指定的以零起始的索引位置。

Item[String]

取得其 ServiceDescription 屬性所指定的 TargetNamespace

Item[Int32]

來源:
ServiceDescriptions.cs
來源:
ServiceDescriptions.cs
來源:
ServiceDescriptions.cs

取得或設定 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 (其值已修改或傳回) 的以零起始的索引。

屬性值

指定之索引處的 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]

來源:
ServiceDescriptions.cs
來源:
ServiceDescriptions.cs
來源:
ServiceDescriptions.cs

取得其 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 的命名空間。

屬性值

以其命名空間屬性指定的 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/")

適用於