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

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

屬性值

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

例外狀況

value 小於零。

-或-

value 大於 Count 屬性。

備註

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

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

適用於

另請參閱