語言

ImportCollection.Add(Import) 方法

定義

將指定的 Import 加入 的末尾 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

參數

import
Import

Import加入收藏。

傳回

參數加入的零基索引 import 。

範例

以下範例展示了該 Add 方法的使用情況。 欲了解更多範例 CreateImport 中使用的方法,請參閱類別 Import 下的範例。

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

適用於