How do I verify in C# that the password contains at least X uppercase letters and at least Y numbers, and the entire string is longer than Z?
Thanks.
This should do it:
public bool CheckPasswordStrength(string password, int x, int y, int z) { return password.Length >= z && password.Count(c => c.IsUpper(c)) >= x && password.Count(c => c.IsDigit(c)) >= y; }