This documentation is archived and is not being maintained.

Control.ControlCollection.GetChildIndex Method

Retrieves the index of a control within the control collection.

Overload List

Retrieves the index of the specified child control within the control collection.

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Public Function GetChildIndex(Control) As Integer
[C#] public int GetChildIndex(Control);
[C++] public: int GetChildIndex(Control*);
[JScript] public function GetChildIndex(Control) : int;

Retrieves the index of the specified child control within the control collection, and optionally raises an exception if the specified control is not within the control collection.

[Visual Basic] Overloads Public Function GetChildIndex(Control, Boolean) As Integer
[C#] public int GetChildIndex(Control, bool);
[C++] public: int GetChildIndex(Control*, bool);
[JScript] public function GetChildIndex(Control, Boolean) : int;

See Also

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

Show: