Please excuse the rubbish title, I don't know how to word it properly. I am wondering how I can use this code:
int cnt = 0;
foreach (char c in test) {
if (c == '&') cnt++;
}
from this question and instead of adding 1 to the count for 'just' &
, add 1 to the count for &
or @
or %
?