語言

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 方法。

Note

當你將項目插入收藏時,集合中後續項目的索引會改變。

適用於

另請參閱