how about regexp
Regex rgx = new Regex(@"^(?=.*(\W.*){4,}).{8,}$", RegexOptions.Compiled); bool validPassword = rgx.IsMatch(password);
4 = min not word / digit char
8 = minimum password
Linq can be considered elegant (it's not IMHO), but at what cost?
------------ Update after comment ---------------
if you want to match a subset of characters, you must replace \W with []
[] = character range
some characters must be escaped with \
in your case: [#\*!\?£\$\+-\^\<\>\[\]~\(\)&]
you can find a regex charter
giammin
source share