Control.ControlCollection.Item[String] Control.ControlCollection.Item[String] Control.ControlCollection.Item[String] Control.ControlCollection.Item[String] Property

定义

重载

Item[Int32] Item[Int32] Item[Int32] Item[Int32]

指示位于集合中指定索引位置的 ControlIndicates the Control at the specified indexed location in the collection.

Item[String] Item[String] Item[String] Item[String]

指示集合中具有指定键的一个 ControlIndicates a Control with the specified key in the collection.

Item[Int32] Item[Int32] Item[Int32] Item[Int32]

指示位于集合中指定索引位置的 ControlIndicates the Control at the specified indexed location in the collection.

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

要从控件集合中检索的控件索引。The index of the control to retrieve from the control collection.

属性值

位于控件集合内指定索引位置的 ControlThe Control located at the specified index location within the control collection.

异常

index 值小于零或者大于等于集合中控件的数量。The index value is less than zero or is greater than or equal to the number of controls in the collection.

注解

若要Control Control.ControlCollection从中检索, 请参考具有特定索引值的集合对象。To retrieve a Control from the Control.ControlCollection, reference the collection object with a specific index value. 的索引值Control.ControlCollection是从零开始的索引。The index value of the Control.ControlCollection is a zero-based index.

另请参阅

Item[String] Item[String] Item[String] Item[String]

指示集合中具有指定键的一个 ControlIndicates a Control with the specified key in the collection.

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; }
member this.Item(string) : System.Windows.Forms.Control
Default Public Overridable ReadOnly Property Item(key As String) As Control

参数

key
String String String String

要从控件集合中检索的控件的名称。The name of the control to retrieve from the control collection.

属性值

Control 中具有指定键的 Control.ControlCollectionThe Control with the specified key within the Control.ControlCollection.

注解

Control Control.ControlCollectionName 属性Control对应于中的的键。The Name property of a Control corresponds to the key for a Control in the Control.ControlCollection.

适用于