If you need a solution for the code, an alternative could be:
if (password.Length >= 10 && password.Any(Char.IsLower) && password.Any(Char.IsUpper) && password.Any(c=>Char.IsDigit(c) || Char.IsSymbol(c))) { }
Please note that these features include Unicode characters. What is surprising for the password. If this is a problem, you can use:
if (password.Length >= 10 && password.Any(c => (c >= 'a') && (c <= 'z')) && password.Any(c => (c >= 'A') && (c <= 'Z')) && password.Any(c => Char.IsDigit(c) || "@#$%^&+=".Contains(c))) { }
source share