TemplateGroupCollection.Item[Int32] TemplateGroupCollection.Item[Int32] TemplateGroupCollection.Item[Int32] TemplateGroupCollection.Item[Int32] Property

定義

取得或設定位於集合中指定索引上的 TemplateGroup 物件。Gets or sets a TemplateGroup object at the specified index in the collection.

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 Int32 Int32 Int32

要在集合中取得或設定的 TemplateGroup 之以零起始的索引。The zero-based index of the TemplateGroup to get or set in the collection.

屬性值

集合中 index 處的 TemplateGroupThe TemplateGroup at index in the collection.

例外狀況

value 小於零。value is less than zero.

-或--or- value 大於 Count 屬性。value is greater than the Count property.

備註

使用Item[Int32]擷取在指定群組的索引子index集合中,或將群組設定在指定index集合中。Use the Item[Int32] indexer to retrieve the group at a specified index within the collection or to set the group at a specified index within the collection. 您可以使用陣列標記法索引集合中的項目。You can index elements in the collection by using array notation. 例如,您可以在此索引中的索引處的項目i加上標記法TemplateGroups(i)的 Microsoft VisualBasic 或TemplateGroups[i]適用於 C#。For example, you can index an element at index i with the notation TemplateGroups(i) for Microsoft VisualBasic or TemplateGroups[i] for C#.

當您有群組物件的參考,而且需要在集合中物件的索引時,使用IndexOf方法。When you have a reference to the group object and need the index of the object in the collection, use the IndexOf method.

適用於

另請參閱