共用方式為


Control.ControlCollection.Item[] 屬性

定義

表示收藏中的A Control

多載

名稱 Description
Item[Int32]

表示集合中指定的索引位置。Control

Item[String]

表示集合中具有指定鍵的 a Control

Item[Int32]

來源:
Control.ControlCollection.cs
來源:
Control.ControlCollection.cs
來源:
Control.ControlCollection.cs
來源:
Control.ControlCollection.cs
來源:
Control.ControlCollection.cs

表示集合中指定的索引位置。Control

public:
 virtual property System::Windows::Forms::Control ^ default[int] { System::Windows::Forms::Control ^ get(int index); };
public virtual System.Windows.Forms.Control this[int index] { get; }
member this.Item(int) : System.Windows.Forms.Control
Default Public Overridable ReadOnly Property Item(index As Integer) As Control

參數

index
Int32

控制項索引,從控制集合中擷取。

屬性值

該 位於 Control 控制集合中指定的索引位置。

例外狀況

index 值小於零,或大於或等於集合中控制項的數量。

備註

要從 Control.ControlCollection中取得 aControl,則參考集合物件並指定特定索引值。 的 Control.ControlCollection 索引值為零為基礎的索引。

另請參閱

適用於

Item[String]

來源:
Control.ControlCollection.cs
來源:
Control.ControlCollection.cs
來源:
Control.ControlCollection.cs
來源:
Control.ControlCollection.cs
來源:
Control.ControlCollection.cs

表示集合中具有指定鍵的 a Control

public:
 virtual property System::Windows::Forms::Control ^ default[System::String ^] { System::Windows::Forms::Control ^ get(System::String ^ key); };
public virtual System.Windows.Forms.Control this[string key] { get; }
public virtual System.Windows.Forms.Control? this[string? key] { get; }
member this.Item(string) : System.Windows.Forms.Control
Default Public Overridable ReadOnly Property Item(key As String) As Control

參數

key
String

從控制集合中取得控制項的名稱。

屬性值

Control 中指定鍵數為 Control.ControlCollection

備註

Name a Control 的性質對應於 中 a 的ControlControl.ControlCollection鍵。

適用於