asp.net.ph

String.LastIndexOf Method ( Char )

System Namespace   String Class


Reports the index position of the last occurrence of a specified Unicode character within the given String.

[ VB ]
<Serializable>
Overloads Public Function LastIndexOf ( _
   ByVal value As Char _
) As Integer

[ C# ]
[ Serializable ]
public int LastIndexOf (
   char value
);

[ C++ ]
[ Serializable ]
public: int LastIndexOf (
   __wchar_t value
);

[ JScript ]
public Serializable
function LastIndexOf (
   value : Char
) : int;

Parameters

value
A Unicode character to seek.

Return Value

The index position of value if that character is found, or -1 if it is not.

Exceptions


Exception Type Condition
ArgumentNullException value is a null reference ( Nothing in Visual Basic ).

Remarks

This method begins searching at the last 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.

See Also

String Members   String.LastIndexOf Overload List   Char   IndexOf   IndexOfAny   LastIndexOfAny Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph