Mono Class Library: System.String Overview | Members

System.String.IndexOfAny Method

Reports the index of the first occurrence in the current instance of any character in a specified array of Unicode characters.

public int IndexOfAny (char[] anyOf)

Parameters

anyOf
An array of Unicode characters.

Returns

The index of the first occurrence of an element of anyOf in the current instance; otherwise, -1 if no element of anyOf was found.

Exceptions

TypeReason
ArgumentNullExceptionanyOf is a null reference.

Remarks

This method is case-sensitive.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0