代码实现:
string test ;
int count = Regex.Matches(test, @"\d").Count;
if (count != 0)
{
return;
}
其中,count为字符串中数字的个数。