Share via


UITestControlCollection.IndexOf Method

Searches for the specified Object and returns the zero-based index of the first occurrence of the specified UITestControl in the complete UITestControlCollection.

Namespace:  Microsoft.VisualStudio.TestTools.UITesting
Assembly:  Microsoft.VisualStudio.TestTools.UITesting (in Microsoft.VisualStudio.TestTools.UITesting.dll)

Syntax

'Declaration
Public Function IndexOf ( _
    control As UITestControl _
) As Integer
public int IndexOf(
    UITestControl control
)
public:
int IndexOf(
    UITestControl^ control
)
member IndexOf : 
        control:UITestControl -> int
public function IndexOf(
    control : UITestControl
) : int

Parameters

Return Value

Type: Int32
The zero-based index of the first occurrence of control in the complete UITestControlCollection, if found; otherwise, -1.

.NET Framework Security

See Also

Reference

UITestControlCollection Class

Microsoft.VisualStudio.TestTools.UITesting Namespace