Click or drag to resize
StringIndexOfAny Method (Char)
Reports the zero-based index of the first occurrence in this instance of any character in a specified array of Unicode characters.

Namespace: System
Assembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
public int IndexOfAny(
	char[] anyOf
)

Parameters

anyOf
Type: SystemChar
A Unicode character array containing one or more characters to seek.

Return Value

Type: Int32
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
ExceptionCondition
ArgumentNullExceptionanyOf is null.
See Also