TFStringComparer.IndexOf Method
Gets the index in the specified string that the first occurrence of the specified pattern appears.
Namespace: Microsoft.TeamFoundation
Assembly: Microsoft.TeamFoundation.Common (in Microsoft.TeamFoundation.Common.dll)
Syntax
'Declaration
Public Function IndexOf ( _
main As String, _
pattern As String _
) As Integer
public int IndexOf(
string main,
string pattern
)
public:
int IndexOf(
String^ main,
String^ pattern
)
member IndexOf :
main:string *
pattern:string -> int
public function IndexOf(
main : String,
pattern : String
) : int
Parameters
- main
Type: System.String
The string.
- pattern
Type: System.String
The pattern to search for.
Return Value
Type: System.Int32
The index in the specified string that the specified pattern begins; -1 if the pattern does not exist in the string; 0 if the string is empty.
.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.