System Namespace String Class
Reports the index position of the last occurrence of a specified Unicode character within the given String. The search starts at a specified character position.
[ VB ]
<Serializable>
Overloads Public Function LastIndexOf ( _
ByVal value As Char, _
ByVal startIndex As Integer _
) As Integer
[ C# ]
[ Serializable ]
public int LastIndexOf (
char value,
int startIndex
);
[ C++ ]
[ Serializable ]
public: int LastIndexOf (
__wchar_t value,
int startIndex
);
[ JScript ]
public Serializable
function LastIndexOf (
value : Char,
startIndex : int
) : int;
- value
- A Unicode character to seek.
- startIndex
- The starting position of a substring within the given String.
The index position of value if that character is found, or -1 if it is not.
This method begins searching at the startIndex character position of this instance and precedes backwards towards the beginning until either value is found or the first character position has been examined. The search is case-sensitive.
String Members String.LastIndexOf Overload List Char Int32 IndexOf IndexOfAny LastIndexOfAny