Microsoft将此规则用作其复杂性规则之一:
Any Unicode character that is categorized as an alphabetic character but is not uppercase or lowercase. This includes Unicode characters from Asian languages.
测试通常的规则,如大写可以像password.Any(char.IsUpper)一样简单.
我可以在C#中使用什么测试来测试非大写或小写的字母Unicode字符?
解决方法
规则的字面翻译怎么样:
password.Any(c => Char.IsLetter(c) && !Char.IsUpper(c) && !Char.IsLower(c))