ControlCollection.IndexOf Method (String)
Searches for the first occurrence of a control with the specified name in the ControlCollection instance.
Namespace: Microsoft.Office.Tools.Word
Assembly: Microsoft.Office.Tools.Word (in Microsoft.Office.Tools.Word.dll)
Syntax
'Declaration
Function IndexOf ( _
name As String _
) As Integer
int IndexOf(
string name
)
Parameters
name
Type: System.StringThe name of the control that you want to find the index of.
Return Value
Type: System.Int32
The index of the control, or -1 if the control is not in the ControlCollection instance.
.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.