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
- control
Type: Microsoft.VisualStudio.TestTools.UITesting.UITestControl
The UITestControl to locate in the UITestControlCollection.
Return Value
Type: System.Int32
The zero-based index of the first occurrence of control in the complete UITestControlCollection, if found; otherwise, -1.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.