System Namespace String Class
Reports the index position of the last occurrence of a specified String within the given String. The search starts at a specified character position and examines a specified number of character positions.
[ VB ]
<Serializable>
Overloads Public Function LastIndexOf ( _
ByVal value As String, _
ByVal startIndex As Integer, _
ByVal count As Integer _
) As Integer
[ C# ]
[ Serializable ]
public int LastIndexOf (
string value,
int startIndex,
int count
);
[ C++ ]
[ Serializable ]
public: int LastIndexOf (
String* value,
int startIndex,
int count
);
[ JScript ]
public Serializable
function LastIndexOf (
value : String,
startIndex : int,
count : int
) : int;
- value
- The String to seek.
- startIndex
- The search starting position.
- count
- The number of character positions to examine.
Value |
Meaning |
A positive index position. |
value was found. |
startIndex |
value is Empty. |
-1 |
value was not found. |
This method begins searching at the startIndex character position of this instance and precedes backwards towards the beginning until either value is found or count character positions have been examined. The search is case-sensitive.
String Members String.LastIndexOf Overload List Int32 IndexOf IndexOfAny LastIndexOfAny