Share via


ImportCollection.Add(Import) Methode

Definition

Fügt am Ende der Import die angegebene ImportCollection hinzu.

public:
 int Add(System::Web::Services::Description::Import ^ import);
public int Add (System.Web.Services.Description.Import import);
member this.Add : System.Web.Services.Description.Import -> int
Public Function Add (import As Import) As Integer

Parameter

import
Import

Der der Auflistung hinzuzufügende Import.

Gibt zurück

Der nullbasierte Index, an dem der import-Parameter hinzugefügt wurde.

Beispiele

Das folgende Beispiel zeigt die Verwendung der Add -Methode. Weitere Informationen zur CreateImport im Beispiel verwendeten Methode finden Sie im Beispiel unter der Import -Klasse.

ServiceDescription^ myServiceDescription = ServiceDescription::Read( "StockQuote_cpp.wsdl" );
myServiceDescription->Imports->Add( CreateImport( "http://localhost/stockquote/schemas", "http://localhost/stockquote/stockquote_cpp.xsd" ) );
ServiceDescription myServiceDescription =
   ServiceDescription.Read("StockQuote_cs.wsdl");
myServiceDescription.Imports.Add(
   CreateImport("http://localhost/stockquote/schemas",
   "http://localhost/stockquote/stockquote_cs.xsd"));
Dim myServiceDescription As ServiceDescription = _
   ServiceDescription.Read("StockQuote_vb.wsdl")
myServiceDescription.Imports.Add( _
   CreateImport("http://localhost/stockquote/schemas", _
   "http://localhost/stockquote/stockquote_vb.xsd"))

Gilt für: