TemplateGroupCollection.Insert(Int32, TemplateGroup) 方法

定義

TemplateGroup 插入位於指定索引的集合。

public:
 void Insert(int index, System::Web::UI::Design::TemplateGroup ^ group);
public void Insert (int index, System.Web.UI.Design.TemplateGroup group);
member this.Insert : int * System.Web.UI.Design.TemplateGroup -> unit
Public Sub Insert (index As Integer, group As TemplateGroup)

參數

index
Int32

要插入 group 集合中之以零起始的索引。

group
TemplateGroup

要插入至集合的 TemplateGroup

例外狀況

index 小於零。

-或-

index 大於 Count 屬性。

備註

方法 Insert 會將 TemplateGroup 物件加入至集合中的特定索引位置。 若要將單 TemplateGroup 一新增至集合結尾,請使用 Add 方法。 若要將多個群組新增至集合,請使用 AddRange 方法。

注意

當您將專案插入集合中時,集合中後續專案的索引會變更。

適用於

另請參閱