ControlCollection.Item[] Property  
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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) : objDefault Public ReadOnly Property Item(index As Integer) As ObjectParameters
- 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) : objDefault Public ReadOnly Property Item(name As String) As ObjectParameters
- 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.