This documentation is archived and is not being maintained.

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)

public:
int IndexOf(
	String^ main, 
	String^ pattern
)

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.

Show: