Condividi tramite


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

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

See Also

Reference

TFStringComparer Class

Microsoft.TeamFoundation Namespace