語言

DesignerRegionCollection.Item[Int32] 屬性

定義

取得或設定 DesignerRegion 物件在集合中指定的索引位置。

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

參數

index
Int32

集合中 to get 或 set 的 DesignerRegion 零基索引。

屬性值

在集合中指定的索引處。DesignerRegion

例外狀況

value 小於零。

-或-

value大於屬性。Count

備註

使用 Item[] 索引器在集合中指定索引處取得區域,或將區域設定在集合內指定索引的位置。 你可以用陣列符號來索引集合中的元素。 例如,你可以用 i 表示 Microsoft VisualBasic 的元素索引為 DesignerRegions(i),C# 則用 DesignerRegions[i]。

當你有區域物件的參考,需要集合中物件的索引時,就用這個 IndexOf 方法。

適用於

另請參閱