Condividi tramite


ControlCollection.Item[] Property

Definition

Overloads

Item[Int32]

Gets the control at the specified index.

Item[Object]

Gets the specified control.

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 that you want to get.

Property Value

The control at the specified index.

Applies to

Item[Object]

Gets the specified control.

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

Parameters

control
Object

The control to return from the ControlCollection instance.

Property Value

The specified control.

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