Share via


ServiceDescriptionCollection.Insert(Int32, ServiceDescription) メソッド

定義

指定した 0 から始まるインデックス番号にある ServiceDescription に、指定した ServiceDescriptionCollection インスタンスを追加します。

public:
 void Insert(int index, System::Web::Services::Description::ServiceDescription ^ serviceDescription);
public void Insert (int index, System.Web.Services.Description.ServiceDescription serviceDescription);
member this.Insert : int * System.Web.Services.Description.ServiceDescription -> unit
Public Sub Insert (index As Integer, serviceDescription As ServiceDescription)

パラメーター

index
Int32

serviceDescription パラメーターを挿入する位置の、0 から始まるインデックス番号。

serviceDescription
ServiceDescription

コレクションに追加する ServiceDescription

例外

index パラメーターが 0 未満。

- または -

index パラメーターが Count より大きい値です。

// Insert a ServiceDescription into the collection.
myCollection->Insert( 1, myServiceDescription2 );
// Insert a 'ServiceDescription' object into the collection.
myCollection.Insert(1, myServiceDescription2);
' Insert a 'ServiceDescription' object into the collection.
myCollection.Insert(1, myServiceDescription2)

注釈

コレクション内の項目の数が既にコレクションの容量と等しい場合、新しい要素が挿入される前に内部配列を自動的に再割り当てすることで、容量が 2 倍になります。

パラメーターが indexCount等しい場合、 serviceDescription パラメーターは の末尾に ServiceDescriptionCollection追加されます。

挿入ポイントの後の要素は、新しい要素に合わせて下に移動します。

適用対象