更新时间:2023-02-26 12:17:40
用这个替换你的 for 循环
:
errorCounter = Regex.Matches(yourstring,@"[a-zA-Z]").Count;
记得使用 Regex
类,你必须在你的导入中使用 System.Text.RegularExpressions;
Remember to use Regex
class, you have to using System.Text.RegularExpressions;
in your import