String..::..IndexOf Method (Char, Int32)
Reports the zero-based index of the first occurrence of the specified Unicode character in this string. The search starts at a specified character position.
Namespace:
SystemAssembly: Bridge (in Bridge.dll)
Syntax
[TemplateAttribute] public int IndexOf( char searchValue, int fromIndex )
<TemplateAttribute> _ Public Function IndexOf ( _ searchValue As Char, _ fromIndex As Integer _ ) As Integer
[TemplateAttribute] public: int^ IndexOf( wchar_t^ searchValue, int^ fromIndex )
Return Value
The zero-based index position of value if that character is found, or -1 if it is not.Exceptions
Exception | Condition |
---|---|
System..::..ArgumentOutOfRangeException | startIndex is less than 0 (zero) or greater than the length of the string. |