語言

ServiceEndpointCollection.InsertItem(Int32, ServiceEndpoint) 方法

定義

在指定的索引處插入一個項目。

protected:
 override void InsertItem(int index, System::ServiceModel::Description::ServiceEndpoint ^ item);
protected override void InsertItem(int index, System.ServiceModel.Description.ServiceEndpoint item);
override this.InsertItem : int * System.ServiceModel.Description.ServiceEndpoint -> unit
Protected Overrides Sub InsertItem (index As Integer, item As ServiceEndpoint)

參數

index
Int32

該項目應插入的以零為基礎的索引。

item
ServiceEndpoint

ServiceEndpoint要插入的項目 在指定的 index。

例外狀況

index 小於零。

-或-

index 大於收藏中包含的項目數量。

item 是 null。

備註

此方法覆蓋基底類別中定義的虛擬 InsertItem(Int32, T) 方法,並用於輸入驗證以確保 null 值不會入集合中。 它並非供使用者使用。

適用於