Compartir a través de


ControlCollection.Item[] Property

Definition

Overloads

Item[Int32]

Gets the control at the specified index.

Item[String]

Gets the control with the specified name.

Item[Int32]

Gets the control at the specified index.

public:
 property System::Object ^ default[int] { System::Object ^ get(int index); };
public object this[int index] { get; }
member this.Item(int) : obj
Default Public ReadOnly Property Item(index As Integer) As Object

Parameters

index
Int32

The zero-based index of the control to get.

Property Value

The control at the specified index.

Applies to

Item[String]

Gets the control with the specified name.

public:
 property System::Object ^ default[System::String ^] { System::Object ^ get(System::String ^ name); };
public object this[string name] { get; }
member this.Item(string) : obj
Default Public ReadOnly Property Item(name As String) As Object

Parameters

name
String

The string that represents the name of the control.

Property Value

The control with the specified name.

Remarks

For controls that you add programmatically, the name parameter should contain the name that you specify as the last parameter of the Add*<control>* method, not the Name property of the control.

For controls that you add at design time, the name parameter should contain the identifier.

Applies to