String..::..IndexOf Method (Char, Int32, Int32)
Reports the zero-based index of the first occurrence of the specified character in this instance. The search starts at a specified character position and examines a specified number of character positions.
Namespace:
SystemAssembly: Bridge (in Bridge.dll)
Syntax
[TemplateAttribute] public int IndexOf( char searchValue, int fromIndex, int count )
<TemplateAttribute> _ Public Function IndexOf ( _ searchValue As Char, _ fromIndex As Integer, _ count As Integer _ ) As Integer
[TemplateAttribute] public: int^ IndexOf( wchar_t^ searchValue, int^ fromIndex, int^ count )
Parameters
- searchValue
- Type: System..::..Char
- fromIndex
- Type: System..::..Int32
- count
- Type: System..::..Int32
The number of character positions to examine.
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 | count or startIndex is negative.-or- startIndex is greater than the length of this string.-or-count is greater than the length of this string minus startIndex. |