ServiceDescriptionCollection.Item[] 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置 ServiceDescription 由传入的参数指定的实例。
重载
| 名称 | 说明 |
|---|---|
| Item[Int32] |
获取或设置指定从零开始的索引处的值 ServiceDescription 。 |
| Item[String] |
ServiceDescription获取由其TargetNamespace属性指定的值。 |
Item[Int32]
获取或设置指定从零开始的索引处的值 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]
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/")