IndexOf

IndexOf(string, int, int, StringComparison)

Returns the zero-based index of the first occurrence of the specified string in the current instance.

public int IndexOf(string value, int startIndex, int count, StringComparison comparisonType)
Parameter Type Description
value String The value.
startIndex Int32 The starting search position
count Int32 The count.
comparisonType StringComparison The type of search to use for the specified string

Return Value

The Int32.

See Also


IndexOf(string, int, StringComparison)

Returns the zero-based index of the first occurrence of the specified string in the current instance. Parameters specify the starting search position in the current string and the type of search to use for the specified string.

public int IndexOf(string value, int startIndex, StringComparison comparisonType)
Parameter Type Description
value String The value.
startIndex Int32 The starting search position
comparisonType StringComparison The type of search to use for the specified string

Return Value

The Int32.

See Also


IndexOf(char, int, int)

Returns the zero-based index of the first occurrence of the specified character in this instance. The search starts at a specified character position and examines a specified number of character positions.

public int IndexOf(char value, int startIndex, int count)
Parameter Type Description
value Char The value.
startIndex Int32 The starting search position
count Int32 The count.

Return Value

The Int32.

See Also


IndexOf(string, StringComparison)

Returns the zero-based index of the first occurrence of the specified string in the current instance. A parameter specifies the type of search to use for the specified string.

public int IndexOf(string value, StringComparison comparisonType)
Parameter Type Description
value String The value.
comparisonType StringComparison The type of search to use for the specified string

Return Value

The Int32.

See Also


IndexOf(string, int, int)

Returns the zero-based index of the first occurrence of the specified string in this instance. The search starts at a specified character position and examines a specified number of character positions.

public int IndexOf(string value, int startIndex, int count)
Parameter Type Description
value String The value.
startIndex Int32 The starting search position
count Int32 The count.

Return Value

The Int32.

See Also


IndexOf(char, int)

Returns the zero-based index of the first occurrence of the specified Unicode character in this string. The search starts at a specified character position.

public int IndexOf(char value, int startIndex)
Parameter Type Description
value Char The value.
startIndex Int32 The starting search position

Return Value

The Int32.

See Also


IndexOf(string)

Returns the zero-based index of the first occurrence of the specified string in this instance.

public int IndexOf(string value)
Parameter Type Description
value String The value.

Return Value

The Int32.

See Also


IndexOf(char)

Returns the zero-based index of the first occurrence of the specified Unicode character in this string.

public int IndexOf(char value)
Parameter Type Description
value Char The value.

Return Value

The Int32.

See Also


IndexOf(string, int)

Returns the zero-based index of the first occurrence of the specified string in this instance. The search starts at a specified character position.

public int IndexOf(string value, int startIndex)
Parameter Type Description
value String The value.
startIndex Int32 The starting search position

Return Value

The Int32.

See Also