Share via


ImportCollection.Add(Import) メソッド

定義

指定した ImportImportCollection の末尾に追加します。

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 パラメーターが追加された、0 から始まるインデックス番号。

次の例は、 メソッドの使用方法を 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"))

適用対象