共用方式為


TemplateGroupCollection.Item[Int32] 屬性

定義

取得或設定位於集合中指定索引上的 TemplateGroup 物件。

public:
 property System::Web::UI::Design::TemplateGroup ^ default[int] { System::Web::UI::Design::TemplateGroup ^ get(int index); void set(int index, System::Web::UI::Design::TemplateGroup ^ value); };
public System.Web.UI.Design.TemplateGroup this[int index] { get; set; }
member this.Item(int) : System.Web.UI.Design.TemplateGroup with get, set
Default Public Property Item(index As Integer) As TemplateGroup

參數

index
Int32

要在集合中取得或設定之 TemplateGroup 的以零起始的索引。

屬性值

集合中 index 處的 TemplateGroup

例外狀況

value 小於零。

-或-

value 大於 Count 屬性。

備註

Item[]使用索引子來擷取集合內指定 index 之 的群組,或是在集合內指定的 index 位置設定群組。 您可以使用陣列標記法,為集合中的專案編制索引。 例如,您可以使用 Microsoft visualBasic 或 TemplateGroups[i] C# 的標記法 TemplateGroups(i) ,在索引處編制元素的索引 i

當您有群組物件的參考,而且需要集合中物件的索引時,請使用 IndexOf 方法。

適用於

另請參閱