/// <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;
}
时间: 2024-10-16 15:02:06