Bridge

String..::..LastIndexOf Method (Char, Int32, Int32)

Reports the zero-based index position of the last occurrence of the specified Unicode character in a substring within this instance. The search starts at a specified character position and proceeds backward toward the beginning of the string for a specified number of character positions.

Namespace:  System
Assembly:  Bridge (in Bridge.dll)

Syntax


[TemplateAttribute]
public int LastIndexOf(
	char ch,
	int startIndex,
	int count
)
<TemplateAttribute> _
Public Function LastIndexOf ( _
	ch As Char, _
	startIndex As Integer, _
	count As Integer _
) As Integer
[TemplateAttribute]
public:
int^ LastIndexOf(
	wchar_t^ ch, 
	int^ startIndex, 
	int^ count
)

Parameters

ch
Type: System..::..Char
startIndex
Type: System..::..Int32
The starting position of the search. The search proceeds from startIndex toward the beginning of this instance.
count
Type: System..::..Int32
The number of character positions to examine.

Return Value

The zero-based index position of value if that character is found, or -1 if it is not found or if the current instance equals Empty.

Exceptions


ExceptionCondition
System..::..ArgumentOutOfRangeExceptionThe current instance does not equal Empty, and startIndex is less than zero or greater than or equal to the length of this instance.-or-The current instance does not equal Empty, and startIndex - count + 1 is less than zero.