What I'm trying to do is fairly simple. The user inputs a string. The program checks and counts the number of vowels present in that text string.
char[] vowels = {'a', 'e', 'i', 'o', 'u'};
int counter = 0;
string s = txtInput.Text.Trim();
char[] arr = s.ToCharArray();
foreach (char i in arr)
{
//checks the 2 arrays for matches
counter++;
}
How can I check the 2 arrays to see if there are any matches?
Thank you.