Export (0) Print
Expand All

Control.ControlCollection.IndexOf Method

Retrieves the index of the specified control in the control collection.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

'Declaration
Public Function IndexOf ( _
	control As Control _
) As Integer

Parameters

control
Type: System.Windows.Forms.Control

The Control to locate in the collection.

Return Value

Type: System.Int32
A zero-based index value that represents the position of the specified Control in the Control.ControlCollection.

If the control is not found in the collection, the IndexOf method return value is -1.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft