ImportCollection.Item[Int32] 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定 Import 的值,於指定的以零起始的索引位置。
public:
property System::Web::Services::Description::Import ^ default[int] { System::Web::Services::Description::Import ^ get(int index); void set(int index, System::Web::Services::Description::Import ^ value); };
public System.Web.Services.Description.Import this[int index] { get; set; }
member this.Item(int) : System.Web.Services.Description.Import with get, set
Default Public Property Item(index As Integer) As Import
參數
屬性值
Import
。
範例
下列範例示範如何使用以零起始的索引逐一查看 的成員 ImportCollection
。
// Get Import Collection.
ImportCollection^ myImportCollection = myServiceDescription->Imports;
Console::WriteLine( "Total Imports in the document = {0}", myServiceDescription->Imports->Count );
// Print 'Import' properties to console.
for ( int i = 0; i < myImportCollection->Count; ++i )
Console::WriteLine( "\tImport Namespace : {0} Import Location : {1} ",
myImportCollection[ i ]->Namespace, myImportCollection[ i ]->Location );
// Get Import Collection.
ImportCollection myImportCollection = myServiceDescription.Imports;
Console.WriteLine("Total Imports in the document = " + myServiceDescription.Imports.Count);
// Print 'Import' properties to console.
for(int i =0; i < myImportCollection.Count; ++i)
Console.WriteLine("\tImport Namespace :{0} Import Location :{1} "
,myImportCollection[i].Namespace
,myImportCollection[i].Location);
' Get Import Collection.
Dim myImportCollection As ImportCollection = myServiceDescription.Imports
Console.WriteLine("Total Imports in the document = " + _
myServiceDescription.Imports.Count.ToString())
' Print 'Import' properties to console.
Dim i As Integer
For i = 0 To myImportCollection.Count - 1
Console.WriteLine(ControlChars.Tab + _
"Import Namespace :{0} Import Location :{1} ", _
myImportCollection(i).Namespace, _
myImportCollection(i).Location)
Next i