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