Mono Class Library: System.String Overview | Members

System.String.LastIndexOfAny Method

Returns the index of the last occurrence of any element of a specified array of characters in the current instance.

public int LastIndexOfAny (char[] anyOf)

Parameters

anyOf
An array of Unicode characters.

Returns

A int containing the index of the last occurrence of any element of anyOf in the current instance, if found; otherwise, -1.

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