How to check if a particular character exists within a character array

Viewed 61576

I am using an array within a C# program as follows:

char[] x = {'0','1','2'};
string s = "010120301";

foreach (char c in s)
{
    // check if c can be found within s
}

How do I check each char c to see if it is found within the character array x?

4 Answers
Related