protected bool IsNumeric(string tempstr)//如果是,返回true
{System.Text.RegularExpressions.Regex rex = new System.Text.RegularExpressions.Regex(@"^\d{22}$");
return (rex.IsMatch(tempstr));
}
參考地址:http://www.cnblogs.com/laoxian/archive/2010/04/30/1724677.html