Index of any characters.

IndexOfAny returns the index of any characters specified.


using System;

class Sample
{
    public static void Main()
    {
        string s = "java2s.com";
        Console.WriteLine(s.IndexOfAny(new char[] { 'a', 'v' }));

    }
}

The output:


1
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.