How to check alphanumeric password in c#

How to check alphanumeric password in c#

 Regex regexObj = new Regex(@"(?!^[0-9]*$)(?!^[a-zA-Z]*$)^([a-zA-Z0-9]{2,})$");
                    Boolean foundMatch = regexObj.IsMatch(txtPassword);
                    if (foundMatch == true)
                    {
                         //Password match
                    }
                     else 
                    {
                         //Password should be only alphanumeric
                     }

2020-02-12