DesignerActionListCollection.Insert(Int32, DesignerActionList) 方法

定義

將提供的 DesignerActionList 插入集合中的指定位置。

public:
 void Insert(int index, System::ComponentModel::Design::DesignerActionList ^ value);
public void Insert (int index, System.ComponentModel.Design.DesignerActionList value);
public void Insert (int index, System.ComponentModel.Design.DesignerActionList? value);
member this.Insert : int * System.ComponentModel.Design.DesignerActionList -> unit
Public Sub Insert (index As Integer, value As DesignerActionList)

參數

index
Int32

應在 value 插入以零為起始的索引。

value
DesignerActionList

要插入至集合的 DesignerActionList

例外狀況

index 小於零,或大於目前集合中的元素計數。

備註

index如果 參數等於 屬性的值Count,則會將新專案加入至集合結尾。

在內部,類別 DesignerActionListCollection 會使用 System.Collections.ArrayList 來包含其物件的集合 DesignerActionList 。 因為清單會維護連續專案,所以插入點後面的元素會向下移動,以容納新的元素。 這個重新排列會在插入點之後變更專案的索引。

適用於

另請參閱