Select from following answers:- It is the last index of the char argument.
- It returns -1,if character does not find.
- It searches strings in reverse order.
- All of the above
- All Above

Above all statements are correct about LastIndexOf method.
For Example:-
string str = "Vishal Kumar";
int index_pos = str.LastIndexOf('Kumar');
if (index_pos != -1)
{
MessageBox.Show(str.Substring(index_pos));
}
Index position is 7
and text is kumar
Show Correct Answer
Asked In: Many Interviews |
Alert Moderator