ImportCollection.Item[Int32] Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the value of an Import at the specified zero-based index.
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
Parameters
Property Value
An Import
.
Examples
The following example demonstrates the use of a zero-based index to iterate through the members of the 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
Applies to
Samarbeid med oss på GitHub
Du finner kilden for dette innholdet på GitHub. Der du også kan opprette og se gjennom problemer og pull-forespørsler. Hvis du vil ha mer informasjon, kan du se vår bidragsyterveiledning.