Item Property

Control.ControlCollection.Item Property

Indicates the Control at the specified indexed location in the collection.

[C#] In C#, this property is the indexer for the Control.ControlCollection class.

[Visual Basic]
Public Overridable Default ReadOnly Property Item( _
   ByVal index As Integer _
) As Control
public virtual Control this[
 int index
] {get;}
public: __property virtual Control* get_Item(
 int index
returnValue = ControlCollectionObject.Item(index);
returnValue = ControlCollectionObject(index);

[JScript] In JScript, you can use the default indexed properties defined by a type, but you cannot explicitly define your own. However, specifying the expando attribute on a class automatically provides a default indexed property whose type is Object and whose index type is String.

Arguments [JScript]

The index of the control to retrieve from the control collection.

Parameters [Visual Basic, C#, C++]

The index of the control to retrieve from the control collection.

Property Value

The Control located at the specified index location within the control collection.


Exception Type Condition
ArgumentOutOfRangeException The index value is less than zero or is greater than or equal to the number of controls in the collection.


To retrieve a Control from the Control.ControlCollection, reference the collection object with a specific index value. The index value of the Control.ControlCollection is a zero-based index.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Control.ControlCollection Class | Control.ControlCollection Members | System.Windows.Forms Namespace | Controls

© 2016 Microsoft