/// <summary>
/// 判断是否数字
/// </summary>
public static bool CheckCharIsNum(string str)
{
string[] h = str.Split(‘.‘);
bool falg = true;
foreach (string item in h)
{
if (!System.Text.RegularExpressions.Regex.IsMatch(item, @"^\d+$"))
{
falg = false;
break;
}
}
return falg;
}
原文:http://www.cnblogs.com/professional-NET/p/4666070.html