String..::..IndexOfAny Method (array<Char>[]()[][], Int32, Int32)
Reports the zero-based index of the first occurrence in this instance of any character in a specified array of Unicode characters. 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 IndexOfAny( char[] anyOf, int startIndex, int count )
<TemplateAttribute> _ Public Function IndexOfAny ( _ anyOf As Char(), _ startIndex As Integer, _ count As Integer _ ) As Integer
[TemplateAttribute] public: int^ IndexOfAny( array<wchar_t^>^ anyOf, int^ startIndex, int^ count )
Parameters
- anyOf
- Type: array<System..::..Char>[]()[][]
A Unicode character array containing one or more characters to seek.
- startIndex
- Type: System..::..Int32
The search starting position.
- count
- Type: System..::..Int32
The number of character positions to examine.
Return Value
The zero-based index position of the first occurrence in this instance where any character in anyOf was found; -1 if no character in anyOf was found.Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | anyOf is null. |
System..::..ArgumentOutOfRangeException | count or startIndex is negative.-or- count + startIndex is greater than the number of characters in this instance. |