米雪飘飞吧 关注:558贴子:2,725
  • 0回复贴,共1
using System.Text.RegularExpressions;
//判断是否为数字
public static bool StrIsInt(string Str)
{
if (Regex.IsMatch(Str, @"^[0-9]+(.[0-9]*)?$"))
{
//是数字
return true;
}
else
{
//不是数字
return false;
}
}


1楼2015-11-09 17:40回复