ImportCollection.Add(Import) Method

Definition

Adds the specified Import to the end of the ImportCollection.

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

Parameters

import
Import

The Import to add to the collection.

Returns

The zero-based index where the import parameter has been added.

Examples

The following example shows the use of the Add method. For more information about the CreateImport method used in the sample, see the example under the Import class.

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"))

Applies to