Searches for the specified string and returns the zero-based index of the first occurrence within the StringCollection.
Syntax
Visual Basic (Usage) | Copy Code |
---|
Dim instance As StringCollection
Dim searchString As String
Dim value As Integer
value = instance.IndexOf(searchString) |
Parameters
- searchString
- The string to locate. The value can be a null reference (Nothing in Visual Basic).
Return Value
The zero-based index of the first occurrence of value in the StringCollection, if found; otherwise, -1.
Requirements
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family
See Also